cancel
Showing results for 
Search instead for 
Did you mean: 

workflow interaction between tasks

gouthr
Champ in-the-making
Champ in-the-making
Hi,

I want to be able to run a sequence of tasks in a particular order and it has a specific set of requirements. Would I be able to perform the same using the Activiti engine? Here's the details of the sequence of steps:

Start -> Task1 -> Task2 ->End

Task1 and Task2 are service tasks which invoke a 'C' language binary. I need to be able to post some output from Task1 so that Task2 can take it as input. Can I setup a Activiti supported DB and write to it from Task1 and read the same from Task2? Or would there be any interface to manage the interactions between the 2 tasks using any Activiti engine related API's that use the default DB.

Both Task1 and Task2 are complex tasks which have their own 'job id' and associated set of input, output and other monitoring states.

I was thinking of using Event handlers to signal the completion of Task1 and begin the execution of Task2.

Now, the question is if my Task1 and Task2 are 'C' language binaries, how can I call the Activiti provided interfaces to write to the default DB from these binaries so that Activiti engine can manage the complete workflow.

Please let me know if my understanding is wrong or if I am missing something here. I am new to Activiti.

Thanks!
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Goutham,

As I understood, your tasks are long running tasks. You want to start TaskX and wait on its completion in the process. The only question is how to wait on the event.
You can use receive task (http://www.activiti.org/userguide/#bpmnReceiveTask) or message/signals tasks (http://www.activiti.org/userguide/#bpmnIntermediateSignalEvent).

Regards
Martin

gouthr
Champ in-the-making
Champ in-the-making
Thanks Martin! That answers the signaling part of the question. I have 2 other questions:

1.
Start -> Task1 -> Task2 -> End

Task1 and Task2 are service tasks which invoke a 'C' language binary. I need to be able to post some output from Task1 so that Task2 can take it as input. Can I setup a Activiti supported DB and write to it from Task1 and read the same from Task2? Or would there be any interface to manage the flow of input/ouput between the 2 tasks using any Activiti engine related API's that use the default DB?
Both Task1 and Task2 are complex tasks which have their own 'job id' and associated set of input, output and other monitoring states. I have played around a bit using execution variables. Would there be a better approach to pass a data structure between 2 tasks?

2.
If my Task1 and Task2 are 'C' language binaries, how can I call the Activiti provided interfaces  (Java interfaces) to write to the default DB from these binaries so that Activiti engine can manage the complete workflow of passing the output from one task and being consumed by the next task in the workflow sequence.

Thanks!

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

{quote}
I have played around a bit using execution variables.
{quote}
Yes that's the way how to pass values between process instance steps. I would not store huge amount of data in the variables - it does not make sense. (http://bitly.nl/redirect/&url=GpLFcd)

{quote}
how can I call the Activiti provided interfaces…
{/quote}
Use service calls (e.g. rest API or any other interface)

Regards
Martin