Class JscriptWorkflowDefinition

    • Constructor Detail

      • JscriptWorkflowDefinition

        public JscriptWorkflowDefinition​(WorkflowDefinition cmrWorkflowDefinition,
                                         ServiceRegistry serviceRegistry,
                                         org.mozilla.javascript.Scriptable scope)
        Create a new instance of WorkflowDefinition from a CMR workflow object model WorkflowDefinition instance
        Parameters:
        cmrWorkflowDefinition - an instance of WorkflowDefinition from the CMR workflow object model
        serviceRegistry - reference to the Service Registry
        scope - the root scripting scope for this object
      • JscriptWorkflowDefinition

        public JscriptWorkflowDefinition​(String id,
                                         String name,
                                         String version,
                                         String title,
                                         String description,
                                         ServiceRegistry serviceRegistry,
                                         org.mozilla.javascript.Scriptable scope)
        Creates a new instance of WorkflowDefinition from scratch
        Parameters:
        id - workflow definition ID
        name - name of workflow definition
        version - version of workflow definition
        title - title of workflow definition
        description - description of workflow definition
        serviceRegistry - reference to the Service Registry
        scope - root scripting scope for this object
    • Method Detail

      • getId

        public String getId()
        Get value of id property
        Returns:
        the id
      • getName

        public String getName()
        Get value of name property
        Returns:
        the name
      • getVersion

        public String getVersion()
        Get value of version property
        Returns:
        the version
      • getTitle

        public String getTitle()
        Get value of title property
        Returns:
        the title
      • getValueConverter

        protected ValueConverter getValueConverter()
        Gets the value converter
        Returns:
        the value converter
      • getDescription

        public String getDescription()
        Get value of description property
        Returns:
        the description
      • startWorkflow

        public JscriptWorkflowPath startWorkflow​(Object properties)
        Start workflow instance from workflow definition without attaching any package node to the workflow
        Parameters:
        properties - Associative array of properties used to populate the start task properties
        Returns:
        the initial workflow path
      • startWorkflow

        public JscriptWorkflowPath startWorkflow​(ScriptNode workflowPackage,
                                                 Object properties)
        Start workflow instance from workflow definition
        Parameters:
        workflowPackage - workflow package node to 'attach' to the new workflow instance
        properties - Associative array of properties used to populate the start task properties
        Returns:
        the initial workflow path
      • getActiveInstances

        public org.mozilla.javascript.Scriptable getActiveInstances()
        Get active workflow instances of this workflow definition
        Returns:
        the active workflow instances spawned from this workflow definition