activiti - activity: how to know if an execution is linked to an instance of (sub)process? -



activiti - activity: how to know if an execution is linked to an instance of (sub)process? -

i'm trying out simple scenario:

process 1 has 2 tasks (task -> task b) process 2 has 1 "call activity" block (calling process 1).

so, started process 2. , goes straight state have 2 executions:

the 1 straight maps instance of process 2. let's say: 123 the 1 associated "call activity". let's say: 456

the question is: how find task process 1 at? (it should task a).

well, can rest queries:

first query executions belong process 2: runtime/executions?processinstanceid=123

here get: [{id: 123}, {id: 456, activityid: "calling_subproc"}]

well, know 456 execution of sub process, next query is:

runtime/process-instances?superprocessinstanceid=123&includeprocessvariables=true

here get: [{id: 789, activityid: "task 1"}]

but..., can because know sub-process, designed model. ... otherwise, how programme (ignorant of fact) find out it? there's nil in response query #1 indicates 456 subprocess (meaning i'll have execute query #2..., rather runtime/tasks?executionid=456&includeprocessvariables=true, by-the-way gives me {data: [0], total: 0, start: 0, sort: "id", order: "asc", size: 0})

---- additional comment : -----

i think rest service runtime/executions should back upwards "superexecutionid" parameter (e.g.: runtime/executions?superexecutionid=87519)... such given execution id (in calling process), can straight navigate spawned sub-process (the database construction supports already):

thanks in advance, raka

this problem in project finished. solution/workaround much listed in above comment, created process variable represent "top level" process instance id.

in order create sure didnt have manually set called processes (i.e. didnt have explicitly model variable passing), added parse handler add together start listener automatically populate variable when called process initiated.

worked charm.

activiti bpmn

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -