本文整理了Java中org.activiti.bpmn.model.Activity.isAsynchronous()
方法的一些代码示例,展示了Activity.isAsynchronous()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Activity.isAsynchronous()
方法的具体详情如下:
包路径:org.activiti.bpmn.model.Activity
类名称:Activity
方法名:isAsynchronous
暂无
代码示例来源:origin: Activiti/Activiti
activity.isAsynchronous());
propertiesNode.put(PROPERTY_EXCLUSIVE,
!activity.isNotExclusive());
代码示例来源:origin: org.finra.herd/herd-service
/**
* Asserts that the first asyncable task in the given model is indeed asynchronous. Only asserts when the configuration is set to true.
*
* @param bpmnModel The BPMN model
*/
private void assertFirstTaskIsAsync(BpmnModel bpmnModel)
{
if (Boolean.TRUE.equals(configurationHelper.getProperty(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ASSERT_ASYNC, Boolean.class)))
{
Process process = bpmnModel.getMainProcess();
for (StartEvent startEvent : process.findFlowElementsOfType(StartEvent.class))
{
for (SequenceFlow sequenceFlow : startEvent.getOutgoingFlows())
{
String targetRef = sequenceFlow.getTargetRef();
FlowElement targetFlowElement = process.getFlowElement(targetRef);
if (targetFlowElement instanceof Activity)
{
Assert.isTrue(((Activity) targetFlowElement).isAsynchronous(), "Element with id \"" + targetRef +
"\" must be set to activiti:async=true. All tasks which start the workflow must be asynchronous to prevent certain undesired " +
"transactional behavior, such as records of workflow not being saved on errors. Please refer to Activiti and herd documentations " +
"for details.");
}
}
}
}
}
代码示例来源:origin: FINRAOS/herd
/**
* Asserts that the first asyncable task in the given model is indeed asynchronous. Only asserts when the configuration is set to true.
*
* @param bpmnModel The BPMN model
*/
private void assertFirstTaskIsAsync(BpmnModel bpmnModel)
{
if (Boolean.TRUE.equals(configurationHelper.getProperty(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ASSERT_ASYNC, Boolean.class)))
{
Process process = bpmnModel.getMainProcess();
for (StartEvent startEvent : process.findFlowElementsOfType(StartEvent.class))
{
for (SequenceFlow sequenceFlow : startEvent.getOutgoingFlows())
{
String targetRef = sequenceFlow.getTargetRef();
FlowElement targetFlowElement = process.getFlowElement(targetRef);
if (targetFlowElement instanceof Activity)
{
Assert.isTrue(((Activity) targetFlowElement).isAsynchronous(), "Element with id \"" + targetRef +
"\" must be set to activiti:async=true. All tasks which start the workflow must be asynchronous to prevent certain undesired " +
"transactional behavior, such as records of workflow not being saved on errors. Please refer to Activiti and herd documentations " +
"for details.");
}
}
}
}
}
代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-converter
if (activity.isAsynchronous()) {
writeQualifiedAttribute(ATTRIBUTE_ACTIVITY_ASYNCHRONOUS, ATTRIBUTE_VALUE_TRUE, xtw);
代码示例来源:origin: org.activiti/activiti-json-converter
propertiesNode.put(PROPERTY_ASYNCHRONOUS, activity.isAsynchronous());
propertiesNode.put(PROPERTY_EXCLUSIVE, !activity.isNotExclusive());
内容来源于网络,如有侵权,请联系作者删除!