Interface IWorkflowFormHandler

    • Method Detail

      • changeState

        @Nullable
        WorkflowState changeState​(WorkflowState targetState)
        Change the state of the form record to the given state. No-op when the form record already is in the given state. This operation persist the new state in the database immediately.
        Parameters:
        targetState - New state for the form record.
        Returns:
        The old state of the form record, or null when it did not have a state yet.
      • deleteFormRecord

        NodeReturnedException deleteFormRecord​(INodeReturnedExceptionBuilder returningBuilder)
                                        throws NodeReturnedException
        Deletes the current form record and throws a NodeReturnedException. This is because deleting the form record always stop the current workflow task.

        If a node handler always deletes the form record upon execution, it should should implement createFlowGraph in such a way that createFlowGraph never adds an outgoing edge from the node.

        Parameters:
        returningBuilder - The builder that may be obtained via returningException. This is used to create the exception that is thrown. If you need to return any values, make sure to set up the builder before calling this method.
        Returns:
        The returning exception. Note that this method never actually returns, it always throws an exception. This return declaration is provided for convenience so that you can write throw ctx.deleteFormRecord(...) in your code and do not have to return anything else.
        Throws:
        NodeReturnedException - Always thrown, this method never completes normally.
      • markFormDataChanged

        void markFormDataChanged()
        Call this when you have modified the form data (getFormDataAdapter). When persistFormRecord() is called later, it will also persist changed to the form data. Please note that only changes made to getRequestDataMap are considered.
      • setSaved

        boolean setSaved​(boolean saved)
        Marks the form record as saved or unsaved by setting the Vorgang.ATTR_IS_SAVED flag of the form record.
        Parameters:
        saved - true to mark the form record as saved, false otherwise.
        Returns:
        true if the saved status of the form has changed.