0 votes
in BPD by
edited by anonymous

2 Answers

0 votes
by (11.7k points)
edited by

one difference is API invocation will return you the instance id in the calling script whereas the UCA invoker never gets the instance id back.

other is you can directly bind a complex variable to a UCA invocation but you have to create a map of variables to invoke through API.

API invocation Example

var map= new tw.object.Map();

map.put("input1", tw.local.input1);

map.put("input2", tw.local.input2);


map.put("inputn", tw.local.inputn);

var instance  = tw.system.startProcessByName("Test API Invocation Process",map);

The above return is of type TWProcessInstance.

tw.local.instanceID = instance.id; 

you may need to split this variable to get the actual instance id e.g. from (2072.660) 660 is the actual instance ID.

if any of the input is optional meaning it will not crash the process you need not send it

One common misconception is that through API invocation you can not send complex variables that is not true Complex Variables can be sent as inputs

0 votes
by (580 points)
Ideally, the end result will be the same. if successfully launched, a new process instance of the BPD will be created.

the difference comes in the internal workings of the BPM product itself.

If you use API ( Server side JS API, WebAPI, REST API) you are intiating communication through a specific protocol and method, and it will differ if you use UCA (  which is more design and event/message oriented )

what is your current usecase?

Related questions

0 votes
1 answer 162 views
0 votes
2 answers 320 views
asked Aug 31, 2018 in BPD by anonymous
+1 vote
2 answers 207 views
asked Dec 1, 2018 in BPD by anonymous
+1 vote
6 answers 995 views
asked Jun 11, 2018 in BPD by anonymous
0 votes
2 answers 166 views
asked May 28, 2018 in BPD by anonymous
0 votes
1 answer 132 views
0 votes
2 answers 192 views
–1 vote
0 answers 43 views
0 votes
1 answer 97 views
asked Jan 4 in Portal by anonymous
0 votes
1 answer 276 views
0 votes
1 answer 410 views
0 votes
0 answers 21 views
+1 vote
1 answer 316 views
0 votes
0 answers 69 views
0 votes
0 answers 130 views

515 questions

423 answers


1.6k users

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.