I get an error when I try to run a custom codelet. It's a simple test codelet, that does a subtraction between two longs. The output is `z`, to not conflict with the ExampleCodelet. I added `z` to the net variables and to the task output variables. Bu I get this error:

2019-06-24 20:53:30,538 [ERROR] ResourceManager :- Automated task '42.3:Operation' could not be successfully completed. Result message: <failure><reason>Problem with process model. Schema validation failed
Task [Operation]
XQuery [null]
Document []
Schema for Expected [<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
<xs:element name="Operation_1">
<xs:complexType>
<xs:sequence>
<xs:element name="z" type="xs:long" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>]
But received [<Operation_1 />]
Validation error message [Error: 1:16: cvc-complex-type.2.4.b: The content of element 'Operation_1' is not complete. One of '{z}' is expected.
]</reason></failure>

PS: when I save the net, I get this message:

ResetNet Analysis Observation: The net Marco_Sulla_Net has an option to complete.

What does it means? Is it somewhat related to the problem above?

The first error message says that the received XML element was empty: <Operation_1 />

The expected return parameter <z>  .... </z> is not there. The reason may be that the codelet was not executed. Did you put the codelet in the right path? The path for codelets is configured in the web.xml file of the Resource Service:

 

 <context-param>
        <param-name>ExternalPluginsPath</param-name>
        <param-value>/opt/codelets</param-value>
        <description>
            Sets the path(s) to search for external 'plugin' classes (i.e. codelets,
            allocators, filters, constraints, data sources, dynamic form attributes).
            Each path must refer to a location on the local disk, for example:
            "C:\yawlplugins". Several paths can be provided, separated by semi-colons,
            for example: "C:\yawlplugins;C:\some\other\place".

            Each path and its sub-directories will be searched for classes, or jar files
            that contain classes, that extend from the corresponding base class. Class
            files must be arranged in their package structure. For example, if the
            'ExternalPluginsPath' is set 'C:\yawlplugins' and there is a codelet file
            called 'MyCodelet.class' and it has a package 'com.example.yawl.codelets'
            then its file path is expected to be:
            'C:\yawlplugins\com\example\yawl\codelets\MyCodelet.class'.

            If there are no external plugins, then this param can be commented out or
            the param-value can be left blank.
        </description>
    </context-param>