Search in sources :

Example 16 with Documentation

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation in project kie-wb-common by kiegroup.

the class SubProcessConverter method convertEmbeddedSubprocessNode.

private BpmnNode convertEmbeddedSubprocessNode(SubProcess subProcess) {
    Node<View<EmbeddedSubprocess>, Edge> node = factoryManager.newNode(subProcess.getId(), EmbeddedSubprocess.class);
    EmbeddedSubprocess definition = node.getContent().getDefinition();
    SubProcessPropertyReader p = propertyReaderFactory.of(subProcess);
    definition.setGeneral(new BPMNGeneralSet(new Name(subProcess.getName()), new Documentation(p.getDocumentation())));
    definition.getOnEntryAction().setValue(p.getOnEntryAction());
    definition.getOnExitAction().setValue(p.getOnExitAction());
    definition.getIsAsync().setValue(p.isAsync());
    definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
    definition.setSimulationSet(p.getSimulationSet());
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : SubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader) AdHocSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) EmbeddedSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 17 with Documentation

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation in project kie-wb-common by kiegroup.

the class SequenceFlowConverter method convertEdge.

public BpmnEdge convertEdge(org.eclipse.bpmn2.SequenceFlow seq, Map<String, BpmnNode> nodes) {
    Edge<View<SequenceFlow>, Node> edge = factoryManager.newEdge(seq.getId(), SequenceFlow.class);
    SequenceFlow definition = edge.getContent().getDefinition();
    SequenceFlowPropertyReader p = propertyReaderFactory.of(seq);
    definition.setGeneral(new BPMNGeneralSet(new Name(seq.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new SequenceFlowExecutionSet(new Priority(p.getPriority()), new ConditionExpression(p.getConditionExpression())));
    return BpmnEdge.of(edge, nodes.get(p.getSourceId()), p.getSourceConnection(), nodes.get(p.getTargetId()), p.getTargetConnection());
}
Also used : SequenceFlow(org.kie.workbench.common.stunner.bpmn.definition.SequenceFlow) Priority(org.kie.workbench.common.stunner.bpmn.definition.property.connectors.Priority) ConditionExpression(org.kie.workbench.common.stunner.bpmn.definition.property.connectors.ConditionExpression) BpmnNode(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.BpmnNode) Node(org.kie.workbench.common.stunner.core.graph.Node) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) SequenceFlowExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.connectors.SequenceFlowExecutionSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) SequenceFlowPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SequenceFlowPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 18 with Documentation

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation in project kie-wb-common by kiegroup.

the class TaskConverter method userTask.

private BpmnNode userTask(org.eclipse.bpmn2.UserTask task) {
    Node<View<UserTask>, Edge> node = factoryManager.newNode(task.getId(), UserTask.class);
    UserTask definition = node.getContent().getDefinition();
    UserTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setSimulationSet(p.getSimulationSet());
    definition.setExecutionSet(new UserTaskExecutionSet(new TaskName(p.getTaskName()), p.getActors(), new Groupid(p.getGroupid()), p.getAssignmentsInfo(), new IsAsync(p.isAsync()), new Skippable(p.isSkippable()), new Priority(p.getPriority()), new Subject(p.getSubject()), new Description(p.getDescription()), new CreatedBy(p.getCreatedBy()), new AdHocAutostart(p.isAdHocAutostart()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    return BpmnNode.of(node);
}
Also used : Description(org.kie.workbench.common.stunner.bpmn.definition.property.task.Description) CreatedBy(org.kie.workbench.common.stunner.bpmn.definition.property.task.CreatedBy) Priority(org.kie.workbench.common.stunner.bpmn.definition.property.connectors.Priority) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) UserTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.UserTaskExecutionSet) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) UserTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.UserTaskPropertyReader) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Subject(org.kie.workbench.common.stunner.bpmn.definition.property.task.Subject) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) Groupid(org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Groupid) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) Skippable(org.kie.workbench.common.stunner.bpmn.definition.property.task.Skippable) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 19 with Documentation

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation in project kie-wb-common by kiegroup.

the class TaskConverter method businessRuleTask.

private BpmnNode businessRuleTask(org.eclipse.bpmn2.BusinessRuleTask task) {
    Node<View<BusinessRuleTask>, Edge> node = factoryManager.newNode(task.getId(), BusinessRuleTask.class);
    BusinessRuleTask definition = node.getContent().getDefinition();
    BusinessRuleTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new BusinessRuleTaskExecutionSet(new RuleFlowGroup(p.getRuleFlowGroup()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new IsAsync(p.isAsync()), new AdHocAutostart(p.isAdHocAutoStart())));
    definition.setSimulationSet(p.getSimulationSet());
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    return BpmnNode.of(node);
}
Also used : RuleFlowGroup(org.kie.workbench.common.stunner.bpmn.definition.property.task.RuleFlowGroup) BusinessRuleTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.BusinessRuleTaskExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) AdHocAutostart(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocAutostart) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) BusinessRuleTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.BusinessRuleTaskPropertyReader) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 20 with Documentation

use of org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation in project kie-wb-common by kiegroup.

the class TaskConverter method scriptTask.

private BpmnNode scriptTask(org.eclipse.bpmn2.ScriptTask task) {
    Node<View<ScriptTask>, Edge> node = factoryManager.newNode(task.getId(), ScriptTask.class);
    ScriptTask definition = node.getContent().getDefinition();
    ScriptTaskPropertyReader p = propertyReaderFactory.of(task);
    definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new ScriptTaskExecutionSet(new Script(p.getScript()), new IsAsync(p.isAsync())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setSimulationSet(p.getSimulationSet());
    return BpmnNode.of(node);
}
Also used : Script(org.kie.workbench.common.stunner.bpmn.definition.property.task.Script) ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) TaskGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ScriptTaskPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ScriptTaskPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) TaskName(org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName) ScriptTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTaskExecutionSet)

Aggregations

Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)31 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)31 View (org.kie.workbench.common.stunner.core.graph.content.view.View)31 Edge (org.kie.workbench.common.stunner.core.graph.Edge)30 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)25 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)16 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)12 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)9 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)7 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)5 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)5 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)4 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)4 AdHocSubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader)3 GatewayPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader)3 ScriptTaskPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ScriptTaskPropertyReader)3 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)3 MessageRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef)3 TaskName (org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName)3 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)3