cancel
Showing results for 
Search instead for 
Did you mean: 

receive task - what does it really do inside engine

bapu
Champ in-the-making
Champ in-the-making
I know that when receive task is reached process state is committed to the persistence store.

Question is what all the things being persisted or Can someone point me to activiti source code part to look at?

thanks
B
9 REPLIES 9

trademak
Star Contributor
Star Contributor
Hi,

This is not one class that you can take a look at. It's at the core of the process engine.
Best would be to find your way through the source code. The ExecutionEntity is an important class to take a look at.

Best regards,

bapu
Champ in-the-making
Champ in-the-making
Thanks Tijs .
I traced(debug) the source - but did not see how Engine commit context.
Basically what i am looking for - is there a way i can commit the workflow context in ServiceTask without using Receive Task.
I don't want to pause the workflow and don't want to signal. 


thanks
Bapu

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Then vote for ACT-126 in jira

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Seems to be already in a branch, so might comer sooner than expected. Then I can remove my own version…

trademak
Star Contributor
Star Contributor
It's even better, it's in trunk already 😉

Best regards,

lichtin
Champ in-the-making
Champ in-the-making
Although when I read Bapu's posts, he does not want to continue asynchronously.
Or perhaps I do not understand what ACT-126 will provide exactly.. the jira is terse.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Basically what i am looking for - is there a way i can commit the workflow context in ServiceTask without using Receive Task.
That is what the async functionality does (maybe a different name would help)

I don't want to pause the workflow
You don't pause it, basically you say, commit what has been done up to now and continue. So you have to put it on the next node

and don't want to signal.
And you do not have to do this, since the async functionality does this for you.

bapu
Champ in-the-making
Champ in-the-making
Looks like http://jira.codehaus.org/browse/ACT-126 is good.  But i was not clear on  ACT-126.  Does this fix  A) persist/commit context after every task or B) does it persist context after receive task and continue without any signal?

But in my case - sorry that i was not clear..
What i really want to achieve is - take a snapshot of context as needed between tasks. In case of any error i want to go back to previous context data?  Can Activiti provide a way to versioning the context data and persist?

thanks lot,
bapu

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
It does a commit when you tell it to.

For your other question, no there is no such functionality, since lots of things could have been done outside the realm of Activiti. You should model those in your process. For technical errors, there is a rollback to the previous stable state.