Question

Datetime parameter for ProcessEngineService.svc

Hello!

 

I am calling ProcessEngineService.svc to start a process externally. This works in general well, however I have trouble using input parameters of the datetime type. I don't know how to properly encode the input datetime, the process never receives the input parameter however I encode the datetime (I've used formats like "yyyy-mm-ddThh:mm" or unix timestamp). Other parameters like strings, ids or booleans are received correctly.

 

For example, I'm calling the url

https://[...].creatio.com/0/ServiceModel/ProcessEngineService.svc/TestProcess/Execute?TicketId=125de8b0-a047-4709-abb3-434baf9dab58&Flag=true&Date1=2020-11-01

In that case I can properly access TickedId and Flag in the test process, but Date1 is always undefined / empty.

 

Kind regards

Kai

Like 0

Like

3 comments

Hi Kai, 

 

Creatio R&D team highly disrecommend calling service directly. Please use the ProcessModuleUtilities.executeProcess utility for your business task instead. Here is an example of how you can standardly place the date:

 

var config = {
 sysProcessId: processId,
 parameters: {
  RecordId: emailId
 }
};

 

Regards,

Anastasiia

Anastasiia Markina,

thank you for your reply. I'm aware of the ProcessModuleUtilites module. However, I need to trigger a process from an external server, not within Creatio. Thus, I can't access this module and need to call the service manually.

 

Kind regards

Kai

For posteriority, I've been able to solve this problem by employing two separate parameters, one string and one DateTime. The string is passed as a GET parameter to ProcessEngineService.svc. Then, in the process I have a C# code block that parses the string (using the DateTime.parse() function) and saves the result in the second parameter (of type DateTime).

 

Regards

Kai

Show all comments