Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

done() method in handler doesn't progress workflow #35

Open
darbio opened this issue May 26, 2016 · 5 comments
Open

done() method in handler doesn't progress workflow #35

darbio opened this issue May 26, 2016 · 5 comments

Comments

@darbio
Copy link

darbio commented May 26, 2016

Hi guys,

Trying to set up a simple BPMN as in this gist:
https://gist.github.com/darbio/ee2a25d951fdbbd93491cd220f706a35

The process won't progress from Send email to Create user.

I've tried a number of different definitions, including the simple Task.js and it's still not progressing with my code.

Cheers.

@darbio
Copy link
Author

darbio commented May 26, 2016

It appears that the token is never passed onto Create user.

@darbio
Copy link
Author

darbio commented May 26, 2016

@darbio
Copy link
Author

darbio commented May 26, 2016

$ node -v
v5.3.0
$ npm -v
3.3.12

bpmn version 0.2.2

@darbio
Copy link
Author

darbio commented May 26, 2016

Calling this.taskDone(taskName, data) seems to work. Calling done in the context of the handler does not.

The following works:

exports.MyTask = function(data, done) {
    // called at the beginning of MyTask
    console.log("MyTask");
    this.taskDone("MyTask", data);
    done(data);
};

@darbio darbio changed the title Can't progress from task to next task done() method in handler doesn't progress workflow May 26, 2016
@christopherRiddersater
Copy link

Are you trying to create automatic/scripted task or are you aiming for manual tasks?
If you are doing automatic tasks, make sure the bpmn process is set to executable and the task is set to "Script task" in the bpmn definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants