Class WorkflowProviderHelper
java.lang.Object
de.xima.fc.workflow.processor.logic.WorkflowProviderHelper
Helper methods for implementing a
IWorkflowProvider.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<EAttachmentSource> computeAllClientCounterRefs(IEntityContext ec, Mandant client) Deprecated.static List<ClientCounter> computeAllClientCounters(IEntityContext ec, Mandant client) static List<MandantRessource> computeAllClientResources(IEntityContext ec, Mandant client) static List<DatenbankZugriff> computeAllDatabaseConnections(IEntityContext ec, Mandant client) static List<Datenquelle> computeAllDatabaseQueries(IEntityContext ec, Mandant client) static List<DirectClientAuthorization> static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> Finds all direct client authorizations select items available for the given client.computeAllFormElements(IEntityContext ec, Mandant client, Projekt project, FormPersist persistOverride) computeAllInboxes(IEntityContext ec, Mandant client) static List<LDAPZugriff> computeAllLdapConnections(IEntityContext ec, Mandant client) static List<LDAPAbfrage> computeAllLdapQueries(IEntityContext ec, Mandant client) static List<INodeWithName> computeAllNodesOfType(WorkflowElementIndex elementIndex, String type) static List<ProjektRessource> computeAllProjectResources(IEntityContext ec, Projekt project) static List<PromptConnectionData> computeAllPromptConnections(Mandant client) Finds all prompt connections owned by the given client.static List<PromptQueryData> computeAllPromptQueries(Mandant client) Finds all prompt queries owned by the given client.static List<IWorkflowQualifiedSubmitButton> computeAllQualifiedSubmitButtons(IEntityContext ec, Projekt project, Locale locale, FormPersist persistOverride) Finds all qualified form submit button from the form of the given project.computeAllRepeatedFormElementContainers(IEntityContext ec, Projekt project, FormPersist persistOverride) computeAllRepeatedFormElements(IEntityContext ec, Mandant client, Projekt project, FormPersist persistOverride) static List<WorkflowStateModel> computeAllStateModels(IEntityContext ec, WorkflowVersion workflowVersion, Locale locale) static List<IWorkflowSubmitButton> computeAllSubmitButtons(IEntityContext ec, Projekt project, FormPersist persistOverride) Finds all form submit button from the form of the given project.static List<ITaskWithName> computeAllTasks(WorkflowElementIndex elementIndex, UUID taskToExclude) static List<ITriggerWithName> computeAllTriggersOfType(WorkflowElementIndex elementIndex, String type, UUID taskToExclude) computeAllUploadElements(Projekt project) static List<BenutzerGruppe> computeAllUserGroups(IEntityContext ec, Mandant client) Finds all user groups avaiable for the given client.static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> computeAllUserGroupSelectItems(IEntityContext ec, Mandant client) Finds all user groups select items available for the given client.computeAllUsers(IEntityContext ec, Mandant client) Deprecated.static List<WebDavAccess> computeAllWebDavConnections(IEntityContext ec, Mandant client) static List<TriggerKey> computeAssignedProvidingTriggers(Mandant client, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) static List<IFileProvidingTriggerWithName> computeAssignedProvidingTriggers(IBaseWorkflowEnvironmentData environmentData, NodeKey target, WorkflowElementIndex index) static List<TriggerKey> computeAssignedTriggers(Mandant client, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) static List<ITriggerWithName> computeAssignedTriggers(IBaseWorkflowEnvironmentData environmentData, NodeKey target, WorkflowElementIndex index) computeAttachmentProvidingParents(Mandant client, Projekt project, NodeKey target, FlowchartElementIndex index, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) Finds all parent node keys that can provide attachments for the given target node.static List<INodeWithName> computeAttachmentProvidingParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node and that can provide attachments to the given node, viaIExecutionResultDescriptor.getCurrentAttachmentValueDescriptor().static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<AttachmentItem>> computeAvailableAttachments(List<String> uploadElements, List<INodeWithName> providingPredecessors, List<INodeWithName> providingParents, GetAvailableAttachmentsParams params, Locale locale) Computes all available attachments items.static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<ResourceItem>> computeAvailableResources(Mandant client, Locale locale, List<ProjektRessource> projectResources, List<MandantRessource> clientResources, List<String> uploadElements, List<IFileProvidingTriggerWithName> firedTriggers, List<IFileProvidingNodeWithName> providingPredecessors, List<IFileProvidingNodeWithName> providingParents, GetAvailableResourcesParams params) computeCompletionAttachmentProvidingPredecessors(Mandant client, Projekt project, IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, FlowGraphFilter.Backward filter) Finds all previous nodes that can provide attachments for the given target node.static List<INodeWithName> computeCompletionAttachmentProvidingPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes that can provide attachments for the given target node.computeCompletionFileProvidingPredecessors(Mandant client, Projekt project, IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, FlowGraphFilter.Backward filter) Finds all previous nodes that have finished execution and that can provide files for the given target node.static List<IFileProvidingNodeWithName> computeCompletionFileProvidingPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes that have finished execution and that can provide files for the given target node.computeCompletionPredecessors(IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes for the given target node, that have finished execution.static List<INodeWithName> computeCompletionPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes for the given target node, that have finished execution.computeDeadNodes(WorkflowFlowAnalysis analysis, ProcessModel processModel) Computes the set of all nodes in a program represented by the abstract syntax tree ofWorkflowNodes.static List<IFileProvidingNodeWithName> computeFileProvidingNodeNamesForCurrent(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) static List<IFileProvidingNodeWithName> computeFileProvidingNodeNamesForPrevious(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) computeFileProvidingParents(Mandant client, Projekt project, NodeKey target, FlowchartElementIndex index, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) Finds all parent node keys that can provide files for the given target node.static List<IFileProvidingNodeWithName> computeFileProvidingParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node and that can provide files to the given node, viaIExecutionResultDescriptor.getCurrentFileValueDescriptor().static List<IFileProvidingTriggerWithName> computeFileProvidingTriggerNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<TriggerKey> triggerKeys) static <TElement extends IWorkflowNodeTypeProviding & IActiveFlagProviding>
WorkflowFlowAnalysiscomputeFlowAnalysis(List<IElementWithTask<TElement>> rootNodes, ITreeWithDataAccessor<TElement, UUID, Object> accessor, Mandant client) Computes the flow analysis for the program represented by the givenroot nodes.static <TElement extends IWorkflowNodeTypeProviding & IActiveFlagProviding>
WorkflowFlowAnalysiscomputeFlowAnalysis(List<IElementWithTask<TElement>> rootNodes, ITreeWithDataAccessor<TElement, UUID, Object> accessor, Mandant client) Deprecated.static List<INodeWithName> computeNodeNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) static List<BaseConfigViewModel> static List<BaseConfigViewModel> computeOrderableAuthenticatorConfigs(IEntityContext ec, Mandant client, Locale locale, boolean kerberosActive, boolean ntlmActive) computeParentControlTransferTargets(Mandant client, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, NodeKey targetNode, String[] targetTypes) Finds all parent nodes for the given target node, filtered to those parent nodes that support one of the given control transfer types.static List<INodeWithName> computeParentControlTransferTargets(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index, String[] targetTypes) Finds all parent nodes for the given target node, filtered to those parent nodes that support one of the given control transfer types.static List<INodeWithName> computeParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node.computeParents(NodeKey targetNode, Map<NodeKey, NodeKey> nodeParentMap) Finds all parent nodes for the given target node.static List<Textbaustein> computeTextTemplatesByCategory(IEntityContext ec, Mandant client, ETextbausteinKategorie cat) static ITriggerWithNamecomputeTriggerName(TriggerModel trigger, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Mandant client) static List<ITriggerWithName> computeTriggerNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<TriggerKey> triggerKeys) static <T extends IUUIDEntity & INameProviding & IDescriptionProviding>
List<EntityRef> createEntityRefsWithName(List<T> entities) Creates a list ofEntityRefs with one entry for each entity, and an additional entry for aEntityRef.forNameValue(String).static <T extends IUUIDEntity & INameProviding & IDescriptionProviding>
List<? extends de.xima.cmn.validation.spec.IChoiceEntry<EntityRef>> createEntityRefsWithNameSelectItems(List<T> entities, String labelEntities, String labelOthers, String labelName) Creates a list of choice entries with anEntityReffor each entity, and an additional entry for aEntityRef.forNameValue(String).createNodeSelectItems(List<INodeWithName> nodes) Creates select items for the UI from the given list of workflow node.static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<QualifiedSubmitButton>> createQualifiedSubmitButtonSelectItems(List<IWorkflowQualifiedSubmitButton> submitButtons) Creates select items for the UI from the given list of form submit buttons.static <T extends IUUIDEntity & INameProviding & IDescriptionProviding>
List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createSelectItems(List<T> entities) Creates select items for the UI from the given list of entities.static <T,S> List <? extends de.xima.cmn.validation.spec.IChoiceEntry<S>> createSelectItems(List<T> items, Function<T, S> getValue, Function<T, String> getName, Function<T, String> getDescription) Creates select items for the UI from the given list of entities, using the given UUID, label, and description extractors.static <T extends IUUIDEntity & INameProviding>
List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createSelectItemsWithoutDescription(List<T> entities) Creates select items for the UI from the given list of entities.static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createStateSelectItems(List<WorkflowStateModel> states) Creates select items for the UI from the given list of workflow states.createSubmitButtonSelectItems(List<IWorkflowSubmitButton> submitButtons) Creates select items for the UI from the given list of form submit buttons.createTaskSelectItems(List<ITaskWithName> tasks) Creates select items for the UI from the given list ofWorkflowTasks.static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<TriggerKey>> createTriggerSelectItems(List<ITriggerWithName> triggers) Creates select items for the UI from the given list ofWorkflowTriggers.createUploadElementSelectItems(List<String> uploadElements) Creates select items for the UI from the given list of form upload elements.static List<IValueDescriptor<String>> getMessageServiceValueDescriptors(List<IPluginMessageService<?>> plugins)
-
Constructor Details
-
WorkflowProviderHelper
public WorkflowProviderHelper()
-
-
Method Details
-
computeAllAttachmentSources
- Returns:
- A list of all
EAttachmentSources from which the user may select.
-
computeAllClientCounterRefs
@Deprecated public static List<EntityRef> computeAllClientCounterRefs(IEntityContext ec, Mandant client) Deprecated.- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- A list of
EntityRefcorresponding to all counters available for the given client.
-
computeAllClientCounters
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All counters available for the given client.
-
computeAllClientResources
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All client files available for the given client.
-
computeAllDatabaseConnections
public static List<DatenbankZugriff> computeAllDatabaseConnections(IEntityContext ec, Mandant client) - Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All database connections available for the given client.
-
computeAllDatabaseQueries
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All database queries available for the given client.
-
computeAllDirectClientAuthorizations
public static List<DirectClientAuthorization> computeAllDirectClientAuthorizations(IEntityContext ec, Mandant client) - Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All direct client authorizations available for the given client.
-
computeAllDirectClientAuthorizationsSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> computeAllDirectClientAuthorizationsSelectItems(IEntityContext ec, Mandant client) Finds all direct client authorizations select items available for the given client.- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All direct client authorizations select items available for the given client.
-
computeAllFormElements
public static List<String> computeAllFormElements(IEntityContext ec, Mandant client, Projekt project, FormPersist persistOverride) - Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.project- A project with a form for which to find its containing form elements.persistOverride- Optional form persist to use. When not given, the form is read from the given project.- Returns:
- A list with the
namesof all form elements from the form of the given project.
-
computeAllInboxes
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All inboxes available for the given client.
-
computeAllLdapConnections
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All LDAP connections available for the given client.
-
computeAllLdapQueries
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All LDAP queries available for the given client.
-
computeAllNodesOfType
public static List<INodeWithName> computeAllNodesOfType(WorkflowElementIndex elementIndex, String type) - Parameters:
elementIndex- Element index with all nodes and triggers.type- Type of the nodes to find. Either from the list of builtinnode types, or from anode plugin.- Returns:
- A list of all nodes of the given type, together with their names.
-
computeAllProjectResources
- Parameters:
ec- Entity context for accessing the database.project- A project for which to find its files.- Returns:
- All form files available for the given client.
-
computeAllPromptConnections
Finds all prompt connections owned by the given client.- Parameters:
client- A client for which to find its connections.- Returns:
- All prompt connections available for the given client.
-
computeAllPromptQueries
Finds all prompt queries owned by the given client.- Parameters:
client- A client for which to find its queries.- Returns:
- All prompt queries available for the given client.
-
computeAllQualifiedSubmitButtons
public static List<IWorkflowQualifiedSubmitButton> computeAllQualifiedSubmitButtons(IEntityContext ec, Projekt project, Locale locale, FormPersist persistOverride) Finds all qualified form submit button from the form of the given project.- Parameters:
ec- Entity context for accessing the database.project- A project with a form for which to find its submit buttons.locale- Locale for generating the display names of each button.persistOverride- Optional form persist to use. When not given, the form is read from the given project.- Returns:
- A list of all qualified submit button of the given form.
-
computeAllRepeatedFormElementContainers
public static List<String> computeAllRepeatedFormElementContainers(IEntityContext ec, Projekt project, FormPersist persistOverride) - Parameters:
ec- Entity context for accessing the database.project- A project with a form for which to find its containing form elements.persistOverride- Optional form persist to use. When not given, the form is read from the given project.- Returns:
- A list with the
namesof all form elements that repeated containers.
-
computeAllRepeatedFormElements
public static List<String> computeAllRepeatedFormElements(IEntityContext ec, Mandant client, Projekt project, FormPersist persistOverride) - Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.project- A project with a form for which to find its containing form elements.persistOverride- Optional form persist to use. When not given, the form is read from the given project.- Returns:
- A list with the
namesof all form elements that are either repeated containers; or avaluableand are either themselves repeated or are inside repeated containers.
-
computeAllStateModels
public static List<WorkflowStateModel> computeAllStateModels(IEntityContext ec, WorkflowVersion workflowVersion, Locale locale) - Parameters:
ec- Entity context for accessing the database.workflowVersion- Workflow version to process.locale- Locale for the display name of each state.- Returns:
- All workflow states available for the workflow version.
-
computeAllSubmitButtons
public static List<IWorkflowSubmitButton> computeAllSubmitButtons(IEntityContext ec, Projekt project, FormPersist persistOverride) Finds all form submit button from the form of the given project.- Parameters:
ec- Entity context for accessing the database.project- A project with a form for which to find its submit buttons.persistOverride- Optional form persist to use. When not given, the form is read from the given project.- Returns:
- A list of all submit button of the given form.
-
computeAllTasks
public static List<ITaskWithName> computeAllTasks(WorkflowElementIndex elementIndex, UUID taskToExclude) - Parameters:
elementIndex- Element index with all nodes and triggers.taskToExclude- An optional UUID of aWorkflowTaskto exclude from the returned result.- Returns:
- A list of all tasks, together with their names, but without the given task to exclude.
-
computeAllTriggersOfType
public static List<ITriggerWithName> computeAllTriggersOfType(WorkflowElementIndex elementIndex, String type, UUID taskToExclude) - Parameters:
elementIndex- Element index with all nodes and triggers.type- Type of the triggers to find. Either from the list of builtintrigger types, or from atrigger plugin.taskToExclude- An optional UUID of a task from which to exclude its triggers in the returned result.- Returns:
- A list of all triggers of the given type, together with their names, but excluding triggers which belong to the given task.
-
computeAllUploadElements
-
computeAllUserGroupSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> computeAllUserGroupSelectItems(IEntityContext ec, Mandant client) Finds all user groups select items available for the given client.- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All user groups select items available for the given client.
-
computeAllUserGroups
Finds all user groups avaiable for the given client.- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All user groups available for the given client.
-
computeAllUsers
Deprecated.- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All users available for the given client.
-
computeAllWebDavConnections
- Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.- Returns:
- All WebDav connections available for the given client.
-
computeAssignedProvidingTriggers
public static List<TriggerKey> computeAssignedProvidingTriggers(Mandant client, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) -
computeAssignedProvidingTriggers
public static List<IFileProvidingTriggerWithName> computeAssignedProvidingTriggers(IBaseWorkflowEnvironmentData environmentData, NodeKey target, WorkflowElementIndex index) -
computeAssignedTriggers
public static List<TriggerKey> computeAssignedTriggers(Mandant client, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) -
computeAssignedTriggers
public static List<ITriggerWithName> computeAssignedTriggers(IBaseWorkflowEnvironmentData environmentData, NodeKey target, WorkflowElementIndex index) -
computeAttachmentProvidingParents
public static Set<NodeKey> computeAttachmentProvidingParents(Mandant client, Projekt project, NodeKey target, FlowchartElementIndex index, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) Finds all parent node keys that can provide attachments for the given target node.- Parameters:
client- Current client.project- Current project.target- Node for which to find previous attachment providing nodes.index- Index with all available workflow elements.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.- Returns:
- All parent nodes and that can provide attachments for the given target node.
-
computeAttachmentProvidingParents
public static List<INodeWithName> computeAttachmentProvidingParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node and that can provide attachments to the given node, viaIExecutionResultDescriptor.getCurrentAttachmentValueDescriptor().- Parameters:
node- Node for which to find parents.client- Current client scope.project- Current project.index- Index mapping node keys to nodes.- Returns:
- All parents of the given node that can provide attachments.
-
computeAvailableAttachments
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<AttachmentItem>> computeAvailableAttachments(List<String> uploadElements, List<INodeWithName> providingPredecessors, List<INodeWithName> providingParents, GetAvailableAttachmentsParams params, Locale locale) Computes all available attachments items.- Parameters:
uploadElements- A list of available upload elements names from the form.providingPredecessors- A list of file providing normal completion nodes that are potential predecessors.providingParents- A list of file providing parent nodes.params- Parameters with the types of items to include.locale- The locale for localizing the display name.- Returns:
- A list of computed
choice entrieswith the available attachments.
-
computeAvailableResources
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<ResourceItem>> computeAvailableResources(Mandant client, Locale locale, List<ProjektRessource> projectResources, List<MandantRessource> clientResources, List<String> uploadElements, List<IFileProvidingTriggerWithName> firedTriggers, List<IFileProvidingNodeWithName> providingPredecessors, List<IFileProvidingNodeWithName> providingParents, GetAvailableResourcesParams params) - Parameters:
client- The currentclient.locale- The current localeprojectResources- A list of form resourcesclientResources- A list of client resourcesuploadElements- A list of upload element namesprovidingPredecessors- A list of file providing normal completion nodes that are potential predecessors.providingParents- A list of file providing parent nodes.params- Parameters with the types of items to include.- Returns:
- A list of computed
SelectItems
-
computeCompletionAttachmentProvidingPredecessors
public static List<INodeWithName> computeCompletionAttachmentProvidingPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes that can provide attachments for the given target node.- Parameters:
environmentData- Data with the client, entity context etc.analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous file providing nodes.index- Index with all available workflow elements.filter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes that can provide attachments for the given target node.
-
computeCompletionAttachmentProvidingPredecessors
public static List<NodeKey> computeCompletionAttachmentProvidingPredecessors(Mandant client, Projekt project, IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, FlowGraphFilter.Backward filter) Finds all previous nodes that can provide attachments for the given target node.- Parameters:
client- Current client.project- Current project.analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous file providing nodes.elementIndex- Index of the available workflow elements.paramsMap- Map between the key of eachWorkflowNodemapped to thefilter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes that can provide attachments for the given target node.
-
computeCompletionFileProvidingPredecessors
public static List<IFileProvidingNodeWithName> computeCompletionFileProvidingPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes that have finished execution and that can provide files for the given target node.- Parameters:
environmentData- Data with the client, entity context etc.analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous file providing nodes.index- Index with all available workflow elements.filter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes that have finished execution and that can provide files for the given target node.
-
computeCompletionFileProvidingPredecessors
public static List<NodeKey> computeCompletionFileProvidingPredecessors(Mandant client, Projekt project, IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, FlowGraphFilter.Backward filter) Finds all previous nodes that have finished execution and that can provide files for the given target node.- Parameters:
client- Current client.project- Current project.analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous file providing nodes.elementIndex- Index of the available workflow elements.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.filter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes that have finished execution and that can provide files for the given target node.
-
computeCompletionPredecessors
public static List<INodeWithName> computeCompletionPredecessors(IBaseWorkflowEnvironmentData environmentData, IWorkflowFlowAnalysis analysis, NodeKey target, WorkflowElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes for the given target node, that have finished execution.- Parameters:
environmentData- Data with the client, entity context etc.analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous nodes.index- Index with all available workflow elements.filter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes for the given target node, that have finished execution.
-
computeCompletionPredecessors
public static List<NodeKey> computeCompletionPredecessors(IWorkflowFlowAnalysis analysis, NodeKey target, FlowchartElementIndex index, FlowGraphFilter.Backward filter) Finds all previous nodes for the given target node, that have finished execution.- Parameters:
analysis- Execution analysis that was performed on the modeltarget- Node for which to find previous file providing nodes.index- Index of the available workflow elements.filter- Filter for flow graph when checking for predecessors, seeFlowGraphFiltersfor some common filters.- Returns:
- All previous nodes for the given target node, that have finished execution.
-
computeDeadNodes
public static Set<NodeKey> computeDeadNodes(WorkflowFlowAnalysis analysis, ProcessModel processModel) Computes the set of all nodes in a program represented by the abstract syntax tree ofWorkflowNodes. A dead node is a node which is not contained in any possible execution path starting at theroot node.- Parameters:
analysis- Workflow analysis for the workflow process.processModel- Process model with a list of tasks to check for dead nodes.- Returns:
- A set of dead nodes that can never be reached when the workflow is executed.
-
computeFileProvidingNodeNamesForCurrent
public static List<IFileProvidingNodeWithName> computeFileProvidingNodeNamesForCurrent(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) - Parameters:
client- Client to which the project with the workflow belongs.project- Current project.elementIndex- Element index with all nodes and triggers.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.nodeKeys- A list of nodes for which to compute the names.- Returns:
- The name for each node from the given node keys, with data related to the provided files of parents. A
INodeHandlermay customize how to obtain the name.
-
computeFileProvidingNodeNamesForPrevious
public static List<IFileProvidingNodeWithName> computeFileProvidingNodeNamesForPrevious(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) - Parameters:
client- Client to which the project with the workflow belongs.project- Current project.elementIndex- Element index with all nodes and triggers.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.nodeKeys- A list of nodes for which to compute the names.- Returns:
- The name for each node from the given node keys, with data related to the provided files. A
INodeHandlermay customize how to obtain the name.
-
computeFileProvidingParents
public static Set<NodeKey> computeFileProvidingParents(Mandant client, Projekt project, NodeKey target, FlowchartElementIndex index, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap) Finds all parent node keys that can provide files for the given target node.- Parameters:
client- Current client.project- Current project.target- Node for which to find previous file providing nodes.index- Index with all available workflow elements.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.- Returns:
- All parent nodes and that can provide files for the given target node.
-
computeFileProvidingParents
public static List<IFileProvidingNodeWithName> computeFileProvidingParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node and that can provide files to the given node, viaIExecutionResultDescriptor.getCurrentFileValueDescriptor().- Parameters:
node- Node for which to find parents.client- Current client scope.project- Current project.index- Index mapping node keys to nodes.- Returns:
- All parents of the given node that can provide files.
-
computeFileProvidingTriggerNames
public static List<IFileProvidingTriggerWithName> computeFileProvidingTriggerNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<TriggerKey> triggerKeys) -
computeFlowAnalysis
public static <TElement extends IWorkflowNodeTypeProviding & IActiveFlagProviding> WorkflowFlowAnalysis computeFlowAnalysis(List<IElementWithTask<TElement>> rootNodes, ITreeWithDataAccessor<TElement, UUID, Object> accessor, Mandant client) Computes the flow analysis for the program represented by the givenroot nodes.- Type Parameters:
TElement- Subtype of the tasks to analyze.- Parameters:
rootNodes- List of tasks for which to compute the analysis.accessor- Adapter for the tree structure represented by the workflow nodes, starting at the root node.client- Client to which the project with the workflow belongs.- Returns:
- The flow analysis for the given tasks.
- Since:
- 8.4.0
-
computeFlowAnalysis
@Deprecated public static <TElement extends IWorkflowNodeTypeProviding & IActiveFlagProviding> WorkflowFlowAnalysis computeFlowAnalysis(List<IElementWithTask<TElement>> rootNodes, ITreeWithDataAccessor<TElement, UUID, Object> accessor, Mandant client) Deprecated.Computes the flow analysis for the program represented by the givenroot nodes.- Type Parameters:
TElement- Subtype of the tasks to analyze.- Parameters:
rootNodes- List of tasks for which to compute the analysis.accessor- Adapter for the tree structure represented by the workflow nodes, starting at the root node.client- Client to which the project with the workflow belongs.- Returns:
- The flow analysis for the given tasks.
-
computeInstalledCharsets
-
computeInstalledFontNames
-
computeNodeNames
public static List<INodeWithName> computeNodeNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<NodeKey> nodeKeys) - Parameters:
client- Client to which the project with the workflow belongs.project- Current project.elementIndex- Element index with all nodes and triggers.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.nodeKeys- A list of nodes for which to compute the names.- Returns:
- The name for each node from the given node keys. A
INodeHandlermay customize how to obtain the name.
-
computeNonOrderableAuthenticatorConfigs
- Parameters:
locale- Locale for the authenticator names.- Returns:
- All non-orderable authenticators available to the given client.
-
computeOrderableAuthenticatorConfigs
public static List<BaseConfigViewModel> computeOrderableAuthenticatorConfigs(IEntityContext ec, Mandant client, Locale locale, boolean kerberosActive, boolean ntlmActive) - Parameters:
ec- Current entity context for accessing the database.client- Client for which to compute the authenticators.locale- Locale for the authenticator names.kerberosActive- Whether Kerberos is available. Affects whether Kerberos-based authenticators are added.ntlmActive- Whether NTLM is available. Affects whether NTLM-based authenticators are added.- Returns:
- All orderable authenticators available to the given client.
-
computeParentControlTransferTargets
public static Set<NodeKey> computeParentControlTransferTargets(Mandant client, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, NodeKey targetNode, String[] targetTypes) Finds all parent nodes for the given target node, filtered to those parent nodes that support one of the given control transfer types.- Parameters:
client- Client scope for finding plugin node handlers.elementIndex- Element index with all nodes and triggers.paramsMap- Map between the key of eachWorkflowNodemapped to theCustom parametersof that node.targetNode- Node for which to find parents.targetTypes- Target control transfer types to which to limit the result.- Returns:
- All parent nodes for the given target node that support one of the given control transfer types.
-
computeParentControlTransferTargets
public static List<INodeWithName> computeParentControlTransferTargets(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index, String[] targetTypes) Finds all parent nodes for the given target node, filtered to those parent nodes that support one of the given control transfer types.- Parameters:
node- Node for which to find parents.client- Current client scope.project- Current project.index- Index mapping node keys to nodes.targetTypes- Target control transfer types to which to limit the result.- Returns:
- All parents of the given node.
-
computeParents
Finds all parent nodes for the given target node.- Parameters:
targetNode- Node for which to find parents.nodeParentMap- Map from a node to its parent.- Returns:
- All previous nodes for the given target node.
-
computeParents
public static List<INodeWithName> computeParents(WorkflowNode node, Mandant client, Projekt project, Map<NodeKey, IWorkflowElementWithDeserializedModel<?, WorkflowNode>> index) Finds all parent nodes for the given target node.- Parameters:
node- Node for which to find parents.client- Current client scope.project- Current project.index- Index mapping node keys to nodes.- Returns:
- All parents of the given node.
-
computeStandardSupportedCharsets
-
computeTextTemplatesByCategory
public static List<Textbaustein> computeTextTemplatesByCategory(IEntityContext ec, Mandant client, ETextbausteinKategorie cat) - Parameters:
ec- Entity context for accessing the database.client- Client to which the project with the workflow belongs.cat- Text template category to which to limit the returned templates. Must not benull.- Returns:
- All text templates of the given type that available for the given client.
-
computeTriggerName
public static ITriggerWithName computeTriggerName(TriggerModel trigger, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Mandant client) - Parameters:
trigger- The trigger set for the task.paramsMap-Custom parametersof the trigger.client- Client to which the project with the workflow belongs.- Returns:
- The name of the given trigger. A
ITriggerHandlermay customize how to obtain the name.
-
computeTriggerNames
public static List<ITriggerWithName> computeTriggerNames(Mandant client, Projekt project, FlowchartElementIndex elementIndex, Map<ElementKey, com.alibaba.fastjson.JSONObject> paramsMap, Iterable<TriggerKey> triggerKeys) - Parameters:
client- Client to which the project with the workflow belongs.project- Current project.elementIndex- Element index with all nodes and triggers.paramsMap- Map between the key of eachWorkflowTriggermapped to theCustom parametersof that trigger.triggerKeys- A list of triggers for which to compute the names.- Returns:
- The name for each trigger from the given trigger keys. A
ITriggerHandlermay customize how to obtain the name.
-
createEntityRefsWithName
public static <T extends IUUIDEntity & INameProviding & IDescriptionProviding> List<EntityRef> createEntityRefsWithName(List<T> entities) Creates a list ofEntityRefs with one entry for each entity, and an additional entry for aEntityRef.forNameValue(String).- Type Parameters:
T- Type of the entities.- Parameters:
entities- Entities to process.- Returns:
- A list of
EntityRefs with one entry for each entity, and an additional entry for aEntityRef.forNameValue(String).
-
createEntityRefsWithNameSelectItems
public static <T extends IUUIDEntity & INameProviding & IDescriptionProviding> List<? extends de.xima.cmn.validation.spec.IChoiceEntry<EntityRef>> createEntityRefsWithNameSelectItems(List<T> entities, String labelEntities, String labelOthers, String labelName) Creates a list of choice entries with anEntityReffor each entity, and an additional entry for aEntityRef.forNameValue(String). The entities are placed in oneIChoiceGroup, and the name entry in a separate choice group.- Type Parameters:
T- Type of the entities.- Parameters:
entities- Entities to process.labelEntities- Localized name for the choice group with the entities.labelOthers- Localized name for the choice group with the name entry.labelName- Localized name of the name entry.- Returns:
- A list of choice entries with an
EntityReffor each entity, and an additional entry for aEntityRef.forNameValue(String).
-
createNodeSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<NodeKey>> createNodeSelectItems(List<INodeWithName> nodes) Creates select items for the UI from the given list of workflow node. The label is theINamedElement.getName(), the value isINodeWithName.getElement().- Parameters:
nodes- Nodes to convert into select items.- Returns:
- The list of nodes, converted to select items for the UI.
-
createQualifiedSubmitButtonSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<QualifiedSubmitButton>> createQualifiedSubmitButtonSelectItems(List<IWorkflowQualifiedSubmitButton> submitButtons) Creates select items for the UI from the given list of form submit buttons. The label is computed from the element name, the technical name and the display name of the submit button. The value is aQualifiedSubmitButton.- Parameters:
submitButtons- List of submit buttons to convert.- Returns:
- The list of submit buttons, converted to select items for the UI.
-
createSelectItems
public static <T extends IUUIDEntity & INameProviding & IDescriptionProviding> List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createSelectItems(List<T> entities) Creates select items for the UI from the given list of entities. The label isINameProviding.getName(), the value is aUuidEntityReffor the entity. Also adds a description fromIDescriptionProviding.getDescription().- Type Parameters:
T- Type of the entities.- Parameters:
entities- List of entities of convert to select items.- Returns:
- The list of entities, converted to select items for the UI.
-
createSelectItems
public static <T,S> List<? extends de.xima.cmn.validation.spec.IChoiceEntry<S>> createSelectItems(List<T> items, Function<T, S> getValue, Function<T, String> getName, Function<T, String> getDescription) Creates select items for the UI from the given list of entities, using the given UUID, label, and description extractors.- Type Parameters:
T- Type of the entities.- Parameters:
items- List of entities of convert to select choice entries.getValue- Function to extract the value from an item.getName- Function to extract the name from an item.getDescription- Function to extract the description from an item.- Returns:
- The list of entities, converted to select items for the UI.
-
createSelectItemsWithoutDescription
public static <T extends IUUIDEntity & INameProviding> List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createSelectItemsWithoutDescription(List<T> entities) Creates select items for the UI from the given list of entities. The label isINameProviding.getName(), the value is aUuidEntityReffor the entity. The description of the select items is left empty.- Type Parameters:
T- Type of the entities.- Parameters:
entities- List of entities of convert to select items.- Returns:
- The list of entities, converted to select items for the UI.
-
createStateSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UuidEntityRef>> createStateSelectItems(List<WorkflowStateModel> states) Creates select items for the UI from the given list of workflow states. The label isWorkflowState.getName(), the value is aUuidEntityReffor the state.- Parameters:
states- List of entities of convert to select items.- Returns:
- The list of states, converted to select items for the UI.
-
createSubmitButtonSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<String>> createSubmitButtonSelectItems(List<IWorkflowSubmitButton> submitButtons) Creates select items for the UI from the given list of form submit buttons. The label is computed from the display name of the submit button. The value is aIWorkflowSubmitButton.- Parameters:
submitButtons- List of submit buttons to convert.- Returns:
- The list of submit buttons, converted to select items for the UI.
-
createTaskSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<UUID>> createTaskSelectItems(List<ITaskWithName> tasks) Creates select items for the UI from the given list ofWorkflowTasks. The label isINamedElement.getName(), the value isITaskWithName.getElement().- Parameters:
tasks- List of tasks to convert to select items.- Returns:
- The list of tasks, converted to select items for the UI.
-
createTriggerSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<TriggerKey>> createTriggerSelectItems(List<ITriggerWithName> triggers) Creates select items for the UI from the given list ofWorkflowTriggers. The label isINamedElement.getName(), the value isITriggerWithName.getElement().- Parameters:
triggers- List of triggers to convert to select items.- Returns:
- The list of triggers, converted to select items for the UI.
-
createUploadElementSelectItems
public static List<? extends de.xima.cmn.validation.spec.IChoiceEntry<String>> createUploadElementSelectItems(List<String> uploadElements) Creates select items for the UI from the given list of form upload elements.- Parameters:
uploadElements- List of form upload elementnames.- Returns:
- The list of upload elements, converted to select items for the UI.
-
getMessageServiceValueDescriptors
public static List<IValueDescriptor<String>> getMessageServiceValueDescriptors(List<IPluginMessageService<?>> plugins)
-
computeAllClientCounters(IEntityContext, Mandant).