cancel
Showing results for 
Search instead for 
Did you mean: 

Custom UserTaskXMLConverter

mleonrivas
Champ in-the-making
Champ in-the-making
Hi everyone,
I need to extend the class UserTaskXMLConverter and I would want to know if there is a way to override this converter by configuration (in the applicationContext.xml or similar), just like with custom parse handlers.

I need to support more complex definitions for potential owners, something like this:

<potentialOwner>
        <resourceAssignmentExpression>
               <formalExpression language="RAL">
                     IS PERSON WHO DID ACTIVITY Write Paper
               </formalExpression>
        </resourceAssignmentExpression>
</potentialOwner>        

And with the current UserTaskXMLConverter I cannot achieve it.

Thanks Smiley Happy
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
The BPMNXmlConverter class has a map of converters it uses:

<code>
public static void addConverter(String elementName, Class<? extends BaseElement> elementClass,
      Class<? extends BaseBpmnXMLConverter> converter) {
   
    convertersToBpmnMap.put(elementName, converter);
    convertersToXMLMap.put(elementClass, converter);
  }
  </code>

Simply overwrite the user task default one with your own implementation