Class AlertWorkflowUnit
- java.lang.Object
-
- com.activeviam.risk.ref.workflows.units.impl.AlertWorkflowUnit
-
- All Implemented Interfaces:
com.qfs.snl.workflows.units.IWorkflowUnit
,com.quartetfs.fwk.types.IExtendedPluginValue
,Serializable
@QuartetExtendedPluginValue(intf=com.qfs.snl.workflows.units.IWorkflowUnit.class, key="AlertWorkflowUnit") public class AlertWorkflowUnit extends Object implements com.qfs.snl.workflows.units.IWorkflowUnit
Basic workflow class to work on alerts.This provides helper methods to create a message for the alert.
- Author:
- QuartetFS
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlertWorkflowUnit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.qfs.snl.messages.IMessage
createMessage(com.qfs.snl.messages.ITemplateEngine templateEngine, String template)
Creates a message forsendMessage(IMessageService, ITemplateEngine, String)
.String
getType()
void
process(com.qfs.snl.workflows.IWorkflowPayload payload)
void
sendMessage(com.qfs.snl.messages.IMessageService messageService, com.qfs.snl.messages.ITemplateEngine templateEngine, String template)
Sends a message about the alert.
-
-
-
Field Detail
-
KEY
public static final String KEY
- See Also:
- Constant Field Values
-
payload
protected com.qfs.snl.workflows.IWorkflowPayload payload
-
-
Method Detail
-
process
public void process(com.qfs.snl.workflows.IWorkflowPayload payload)
- Specified by:
process
in interfacecom.qfs.snl.workflows.units.IWorkflowUnit
-
getType
public String getType()
- Specified by:
getType
in interfacecom.quartetfs.fwk.types.IExtendedPluginValue
-
createMessage
protected com.qfs.snl.messages.IMessage createMessage(com.qfs.snl.messages.ITemplateEngine templateEngine, String template)
Creates a message forsendMessage(IMessageService, ITemplateEngine, String)
.- Parameters:
templateEngine
- template engine to use to render contenttemplate
- path to the template to use- Returns:
- the create message
-
sendMessage
public void sendMessage(com.qfs.snl.messages.IMessageService messageService, com.qfs.snl.messages.ITemplateEngine templateEngine, String template)
Sends a message about the alert.The message has level
MessageLevel.DANGER
, a default title and a content generated from a given template.- Parameters:
messageService
- message service used to send messagestemplateEngine
- template engine to use to render contenttemplate
- path to the template to use
-
-