How to pass "Collection type" Parameter from Code

In this Code "CollectionParameter" is Collection of records type.

 

const handlerChain = sdk.HandlerChainService.instance;
const result = await handlerChain.process({
    type: "crt.RunBusinessProcessRequest",
    processName: "UsrSomeProcess1",
    processParameters: {
      CollectionParameter : //How it should be passed ?
      SomeParameter: "Some Value" //ID Paramete
    },
    $context: request.$context
});
 
if (result.success) {
    // process was sucessfully executed
}

 

 

Like 0

Like

1 comments

Hello!

 

You can use the ProcessEngineService in order to run a business process through a web service and send a collection parameter. The Academy has published an article with a detailed example of how to use ProcessEngineService, which you can find at https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/integrations-and-api/business-process-service/examples/run-the-business-process-web-service

Additionally, there's an overview of the web service that explains how to send a key-value collection of incoming parameters, and you can access it at https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/integrations-and-api/business-process-service/overview

Show all comments