Class WorkflowTemplate

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    @Deprecated
    public class WorkflowTemplate
    extends GeneratedWorkflowTemplate
    Deprecated.
    since ages - as of release 4.3, please useWorkflowTemplateModel

    Template for creating an workflow instance. The instance will be getting the attributes of this template.

    See Also:
    Serialized Form
    • Constructor Detail

      • WorkflowTemplate

        public WorkflowTemplate()
        Deprecated.
    • Method Detail

      • createItem

        protected Item createItem​(SessionContext ctx,
                                  ComposedType type,
                                  Item.ItemAttributeMap allAttributes)
                           throws JaloBusinessException
        Deprecated.
        Description copied from class: Item
        Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) during ComposedType.newInstance(Map).

        In case this method uses any of the attribute values during creation it is required to override Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
        Sn example:

        
         public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
         ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
         man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
         // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
         SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
         super.getNonInitialAttributes( ctx, allAttributes );
         // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
        
         
        Overrides:
        createItem in class Job
        Parameters:
        ctx - the current session context which this item is created within
        type - the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )
        Returns:
        the new item instance
        Throws:
        JaloBusinessException - indicates an error during creation - any changes will be rollbacked
      • createActions

        protected java.util.List<WorkflowAction> createActions​(Workflow workflow)
        Deprecated.
        Creates new actions corresponding to the action templates set to this workflow template. Also creates the decisions and links associated
        Parameters:
        workflow - workflow instance set to the new action instances
        Returns:
        list of created actions
      • copyAndConnectionAttribute

        public void copyAndConnectionAttribute​(WorkflowDecisionTemplate workflowDecisionTemplate,
                                               java.util.List<WorkflowAction> workflowActions,
                                               WorkflowDecision newDecision)
        Deprecated.
        Sets the andConntection Attribute on the extendet Relation WorkflowActionLinkRelation.
        Parameters:
        workflowDecisionTemplate - The decisionTemplate which holds the source for the copy.
        workflowActions - The list actions in this workflow.
        newDecision - The new workflowDecision which holds the target of the copy.
      • getWorkAction

        protected WorkflowAction getWorkAction​(WorkflowActionTemplate templateAction,
                                               java.util.List<WorkflowAction> workflowActions)
        Deprecated.
        Gets the action out of given action list which was created by given action template.
        Parameters:
        templateAction - template for which a corresponding action is searched
        workflowActions - list of actions which will be searched
        Returns:
        the action that was created based on given action template
      • isValidWorkflowTemplateActions

        protected boolean isValidWorkflowTemplateActions()
        Deprecated.
        checks if all workflow template actions have at least one option, except for the actions with action type end
        Returns:
        true if all workflow template actions have at least one option