update - 完成抄送处理
This commit is contained in:
parent
19b3a9cf2c
commit
e8196796fc
@ -15,8 +15,11 @@ import org.flowable.engine.delegate.event.FlowableCancelledEvent;
|
||||
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
|
||||
import org.flowable.engine.impl.util.CommandContextUtil;
|
||||
import org.flowable.engine.impl.util.ProcessDefinitionUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@ -28,8 +31,10 @@ import java.util.Optional;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RefreshScope
|
||||
public class MessagePushProcessEventListener implements BpmnProcessEventListener, Ordered {
|
||||
|
||||
@Value("${workflow.carbonCopyTemplateCode}")
|
||||
private String carbonCopyTemplateCode;
|
||||
@Override
|
||||
public void onCancelled(FlowableCancelledEvent event) {
|
||||
if (log.isDebugEnabled()) {
|
||||
@ -83,6 +88,10 @@ public class MessagePushProcessEventListener implements BpmnProcessEventListener
|
||||
MessagePushEventImpl messagePushEvent =
|
||||
MessagePushEventBuilder.createEvent(MessagePushEventType.PENDING_COMPLETE, null, noticeConfig,
|
||||
event.getProcessInstanceId(), null, null);
|
||||
|
||||
if (!StringUtils.hasText(noticeConfig.getCarbonCopy().getCarbonCopyMessageId())) {
|
||||
noticeConfig.getCarbonCopy().setCarbonCopyMessageId(carbonCopyTemplateCode);
|
||||
}
|
||||
MessagePushEventImpl carbonCopyCompleteEvent =
|
||||
MessagePushEventBuilder.createEvent(MessagePushEventType.CARBON_COPY_COMPLETE, null, noticeConfig,
|
||||
event.getProcessInstanceId(), null, null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user