Klasse WorkflowScheduler

java.lang.Object
org.imixs.workflow.engine.WorkflowScheduler
Alle implementierten Schnittstellen:
Scheduler

public class WorkflowScheduler extends Object implements Scheduler
This EJB implements a Imixs Scheduler Interface and scans workitems for scheduled activities.

The configuration of the scheduler is based on the Imixs Scheduler API.

Version:
1.0
Autor:
rsoika
  • Felddetails

  • Konstruktordetails

    • WorkflowScheduler

      public WorkflowScheduler()
  • Methodendetails

    • workItemInDue

      public boolean workItemInDue(ItemCollection doc, ItemCollection docActivity)
      This method checks if a workitem (doc) is in due. There are 4 different cases which will be compared: The case is determined by the keyScheduledBaseObject of the activity entity Basis : keyScheduledBaseObject "last process"=1, "last Modification"=2 "Creation"=3 "Field"=4 The logic is not the best one but it works. So we are open for any kind of improvements
      Gibt zurück:
      true if workitem is is due
    • addWorkDays

      public Calendar addWorkDays(Calendar baseDate, int days)
      This method adds workdays (MONDAY - FRIDAY) to a given calendar object. If the number of days is negative than this method subtracts the working days from the calendar object.
      Parameter:
      days -
      cal -
      Gibt zurück:
      new calendar instance
    • run

      public ItemCollection run(ItemCollection configItemCollection) throws SchedulerException
      This method process scheduled workitems. The method updates the property 'datLastRun' Because of bug: https://java.net/jira/browse/GLASSFISH-20673 we check the imixsDayOfWeek
      Angegeben von:
      run in Schnittstelle Scheduler
      Parameter:
      timer -
      Gibt zurück:
      updated scheduler configuration
      Löst aus:
      AccessDeniedException
      SchedulerException
    • processWorkListByEvent

      protected void processWorkListByEvent(org.openbpmn.bpmn.BPMNModel model, ItemCollection taskEntity, ItemCollection eventEntity, ItemCollection configItemCollection) throws ModelException, QueryException
      This method processes all workitems for a specific scheduled event element of a workflow model. A scheduled event element can define a selector (txtscheduledview). If no selector is defined, the default selector is used:

      ($taskid:"[TASKID]" AND $modelversion:"[MODELVERSION]")

      Parameter:
      event - - a event model element
      Löst aus:
      ModelException
      QueryException
      Exception