Class WorkflowUtil
java.lang.Object
com.ssgllc.fish.service.util.registered.WorkflowUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.ssgllc.fish.service.dto.ProcessNotificationConfigHolder
getNotificationConfigFromString
(String notificationConfigString) Deserializes a JSON string into a process notification object.getSingleMatchFromDecisionTable
(String decisionKey, Map<String, Object> inputVariables) Reads single matching rule from decision table
-
Constructor Details
-
WorkflowUtil
public WorkflowUtil()
-
-
Method Details
-
getSingleMatchFromDecisionTable
public Map<String,Object> getSingleMatchFromDecisionTable(String decisionKey, Map<String, Object> inputVariables) Reads single matching rule from decision table- Parameters:
decisionKey
- Decision key for the decision table.inputVariables
- Input variables for the decision table.- Returns:
- a Map with the decision(s) result(s) in case of match, returns null when no match or more than one match is found.
-
getNotificationConfigFromString
public com.ssgllc.fish.service.dto.ProcessNotificationConfigHolder getNotificationConfigFromString(String notificationConfigString) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, ClassNotFoundException, IOException Deserializes a JSON string into a process notification object.- Parameters:
notificationConfigString
- The JSON string representing a the process notification object.- Returns:
- The deserialized process notification object.
- Throws:
com.fasterxml.jackson.core.JsonParseException
- If the JSON string is malformed.com.fasterxml.jackson.databind.JsonMappingException
- If the JSON mapping to the process notification object class fails.ClassNotFoundException
- If the process notification object class cannot be found.IOException
- If an I/O error occurs during deserialization.
Groovy example:
return workflowUtil.getNotificationConfigFromString(systemUtil.getTextTemplate("NotificationConfig"))
Returns:
AProcessNotificationConfigHolder
object populated with data from the JSON string.
SpEL example:
#getNotificationConfigFromString(#getTextTemplate("NotificationConfig"))
Returns:
A process notification object populated with data from the JSON string.
-