cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new task, out of BPMN constructs

asyncwait
Champ in-the-making
Champ in-the-making
Wondering what it takes to write a custom task that is not mentioned in BPMN constructs, for example, we would like our business modellers to write XML like this –


<managersTask id="task1" action="one.of.allowed.action.for.managers"/>


Please note that this approach is favored just because it encompasses lot of other implementation details and keeps modeller's side of work simple and clean.

Any thoughts?

Thanks
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
From the top of my head:

- Java representation class
- Xml converter class
- Parser class
- Behaviour class

But most importantly, you'll need to change the default XSD being used. It wont validate against the BPMN 2.0 spec.

I would not advise to do it like that, but use a regular service task.

asyncwait
Champ in-the-making
Champ in-the-making
Yes, looks like the XML I am trying to process fails during the XSD validation. While I feel, the XSD validation shouldn't be there or may be designed in a way that a custom schema validator can be hooked into validation process, I agree with you advise that this approach going completely against the spec. I remember OSWorkflow used to have that flexibility.

Thanks for the quick response.

asyncwait
Champ in-the-making
Champ in-the-making
Although the error it produces when XSD validator detects a wrong element seems little weird. Would be happy to provide a patch that produces more clarity on the error message.

Below is the one I get today –

<code>
cvc-complex-type.2.4.a: Invalid content was found starting with element 'restServiceTask'. One of '{\"http://www.omg.org/spec/BPMN/20100524/MODEL\':flowElement, \"http://www.omg.org/spec/BPMN/20100524/MODEL\':artifact, \"http://www.omg.org/spec/BPMN/20100524/MODEL\':resourceRole, \"http://www.omg.org/spec/BPMN/20100524/MODEL\':correlationSubscription, \"http://www.omg.org/spec/BPMN/20100524/MODEL\':supports}' is expected.
</code>