marklogic-community / marklogicworkflow

Content and Human Centric Workflow for MarkLogic NoSQL systems
Other
19 stars 12 forks source link

Adding persistent attributes support #70

Closed miguelrgonzalez closed 9 years ago

miguelrgonzalez commented 9 years ago

Morning Adam,

We would like to make available some of the attributes from a particular workflow step, to the following ones.

Imagine a simple workflow with 3 steps:

1 - User introduces personal details including email address 2 - Some checks are done on the data 3 - An email is sent to the user

What we would like to have is a way to send an email to the user, without having to send this information again.

This is my proposed solution.

Step 1 request:

ext:processNamesimple-workflow/ext:processName ext:data John Doe john@doe.com /ext:data ext:attachments/ /ext:createRequest Tagging the email element with persist = ‘true’ will trigger the following process document: wf:persisted john@doe.com /wf:persisted wf:data{$data}/wf:data wf:attachments{$attachments}/wf:attachments wf:audit-trail/wf:audit-trail wf:metrics/wf:metrics /wf:process, Step 3 can now easily retrieve this information. We could even add a second attribute, editable, if we wanted to avoid updates on the element value. What do you think? Any comments and/or suggestions? Thanks, Miguel P.S: probably it will be even clearer the intention if we renamed the element wf:data, to something like wf:transient-data
adamfowleruk commented 9 years ago

Not an issue. Use sendTask as documented in documentation/STEPS.md. Functionality was added in Issue #1 . Example process available in https://github.com/adamfowleruk/marklogicworkflow/blob/master/data/examples/bpmn2/022-email-test.bpmn .