0 votes
2.2k views
in BPD by
edited by anonymous

2 Answers

+1 vote
by (16.3k 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 (660 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 1.5k views
0 votes
2 answers 1.6k views
asked Aug 31, 2018 in BPD by anonymous
+1 vote
2 answers 1.9k views
asked Dec 1, 2018 in BPD by anonymous
+1 vote
8 answers 6.8k views
asked Jun 11, 2018 in BPD by anonymous
0 votes
2 answers 2.3k views
asked May 28, 2018 in BPD by anonymous
0 votes
0 answers 253 views
asked Mar 30, 2020 in BPD by Anil Singh (16.3k points)
0 votes
1 answer 1.1k views
–1 vote
0 answers 908 views
0 votes
2 answers 2.2k views
0 votes
1 answer 1.5k views
asked Jan 4, 2019 in Portal by anonymous
0 votes
1 answer 1.7k views
0 votes
1 answer 2.5k views
0 votes
0 answers 655 views

635 questions

495 answers

98 comments

2.9k users

Join BPM Community Discord Channel

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.
Created by Dosvak LLC
Our Youtube Channel
...