Class WorkitemLinkController

java.lang.Object
org.imixs.workflow.office.forms.WorkitemLinkController
All Implemented Interfaces:
Serializable

@Named @RequestScoped public class WorkitemLinkController extends Object implements Serializable
The WorkitemLinkController provides suggest-box behavior based on the JSF 2.0 ajax capability to add WorkItem references to the current WorkItem. All WorkItem references will be stored in the property 'txtworkitemref' Note: @RequestScoped did not work because the ajax request will reset the result during submit
Version:
1.0
Author:
rsoika
See Also:
  • Field Details

    • MAX_SEARCH_RESULT

      public static final int MAX_SEARCH_RESULT
      See Also:
    • logger

      public static Logger logger
    • workflowService

      protected org.imixs.workflow.engine.WorkflowService workflowService
    • schemaService

      protected org.imixs.workflow.engine.index.SchemaService schemaService
    • workflowController

      @Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController
  • Constructor Details

    • WorkitemLinkController

      public WorkitemLinkController()
  • Method Details

    • searchWorkitems

      public void searchWorkitems()
      This method searches a text phrase within the user profile objects (type=profile).

      JSF Integration: <h:commandScript name="imixsOfficeWorkflow.mlSearch" action= "#{cargosoftController.search()}" rendered="#{cargosoftController!=null}" render= "cargosoft-results" />

      JavaScript Example:

       
        imixsOfficeWorkflow.cargosoftSearch({ item: '_invoicenumber' })
        
       
    • searchWorkitems

      public List<org.imixs.workflow.ItemCollection> searchWorkitems(String phrase, String filter)
      This method returns a list of profile ItemCollections matching the search phrase. The search statement includes the items 'txtName', 'txtEmail' and 'txtUserName'. The result list is sorted by txtUserName
      Parameters:
      phrase - - search phrase
      Returns:
      - list of matching profiles
    • getSearchResult

      public List<org.imixs.workflow.ItemCollection> getSearchResult()
    • computeSearchHash

      public static int computeSearchHash(String _phrase, String _filter)
      Helper method compute a hash from a phrase and a filter rule
    • getReferences

      @Deprecated public List<org.imixs.workflow.ItemCollection> getReferences()
      Deprecated.
      Deprecated - use getReferencesInbound
      Returns:
      - list of ItemCollection
    • getReferences

      @Deprecated public List<org.imixs.workflow.ItemCollection> getReferences(String filter)
      Deprecated.
      Deprecated - use getReferencesInbound
      Returns:
      - list of ItemCollection with matches the current filter
    • getReferencesOutbound

      public List<org.imixs.workflow.ItemCollection> getReferencesOutbound()
      This method returns a list of ItemCollections referred by the item '$WorkitemRef'.
      Returns:
      Throws:
      NamingException
    • getReferencesOutbound

      public List<org.imixs.workflow.ItemCollection> getReferencesOutbound(String filter)
      This method returns a list of ItemCollections referred by the item '$WorkitemRef'.

      The filter will be applied to the result list. So each WorkItem will be tested if it matches the filter expression.

      The resultset is sorted by $created

      Returns:
      - list of ItemCollection with matches the current filter
    • getExternalReference

      @Deprecated public List<org.imixs.workflow.ItemCollection> getExternalReference()
      Deprecated.
      Deprecated - use getReferencesOutbound instead
      Returns:
    • getExternalReferences

      @Deprecated public List<org.imixs.workflow.ItemCollection> getExternalReferences(String filter)
      Deprecated.
      Deprecated - use getReferencesOutbound
      Parameters:
      filter -
      Returns:
      Throws:
      NamingException
    • getReferencesInbound

      public List<org.imixs.workflow.ItemCollection> getReferencesInbound()
      This method returns a list of all workItems holding a reference to the current workItem.
      Returns:
      - list of ItemCollection
    • getReferencesInbound

      public List<org.imixs.workflow.ItemCollection> getReferencesInbound(String filter)
      This method returns a list of all workItems holding a reference to the current workItem. If the filter is set the processID will be tested for the filter regex
      Parameters:
      filter -
      Returns:
      Throws:
      NamingException
    • getReferencesOutboundByIds

      public List<org.imixs.workflow.ItemCollection> getReferencesOutboundByIds(List<String> ids)
      This method returns a list of ItemCollections referred by list of IDs.
      Returns:
      - list of ItemCollection with matches the given ids
    • getWorkitem

      public org.imixs.workflow.ItemCollection getWorkitem(String id)
      Helper method to load a full workitem from the frontend
      Parameters:
      id -
      Returns: