@PublicApi public abstract class AbstractWorkflowParticipantHandler extends Object implements com.botronsoft.cmj.spi.configuration.workflow.WorkflowParticipantHandler
WorkflowParticipantHandler
implementations that want to use the DSL for describing the syntax of transition
participant arguments. Transition participants are conditions, validators and post-functions. Extend this class and implement the
describeArguments()
method to describe the syntax of all arguments by invoking the condition(String)
,
validator(String)
, postFunction(String)
methods.Constructor and Description |
---|
AbstractWorkflowParticipantHandler()
Non-argument constructor for implementations.
|
Modifier and Type | Method and Description |
---|---|
protected ArgumentContainerDescriptor |
condition(String className)
Describes the syntax of the different arguments of a condition.
|
protected abstract void |
describeArguments()
Implement this method to describe the syntax of transition participant arguments.
|
protected void |
handleError(String className,
String argumentName,
Throwable t)
This method will be invoked when an exception is caught during processing of an argument.
|
protected ArgumentContainerDescriptor |
postFunction(String className)
Describes the syntax of the different arguments of a post-function.
|
Map<String,String> |
transformArgumentsForExport(String className,
Map<String,String> args,
com.botronsoft.cmj.spi.configuration.ExportContext exportContext) |
Map<String,String> |
transformArgumentsForImport(String className,
Map<String,String> args,
com.botronsoft.cmj.spi.configuration.ImportContext importContext) |
protected String |
transformUnhandledArgumentForExport(String className,
String argName,
String argValue,
com.botronsoft.cmj.spi.configuration.ExportContext exportContext)
This method will be invoked for each argument that has not been described in
describeArguments() . |
protected String |
transformUnhandledArgumentForImport(String className,
String argName,
String argValue,
com.botronsoft.cmj.spi.configuration.ImportContext importContext)
This method will be invoked for each argument that has not been described in
describeArguments() . |
protected ArgumentContainerDescriptor |
validator(String className)
Describes the syntax of the different arguments of a validator.
|
public AbstractWorkflowParticipantHandler()
public Map<String,String> transformArgumentsForExport(String className, Map<String,String> args, com.botronsoft.cmj.spi.configuration.ExportContext exportContext)
transformArgumentsForExport
in interface com.botronsoft.cmj.spi.configuration.workflow.WorkflowParticipantHandler
public Map<String,String> transformArgumentsForImport(String className, Map<String,String> args, com.botronsoft.cmj.spi.configuration.ImportContext importContext)
transformArgumentsForImport
in interface com.botronsoft.cmj.spi.configuration.workflow.WorkflowParticipantHandler
protected abstract void describeArguments()
#condition(String)}, {@link #validator(String)}, {@link #postFunction(String)}.
protected void handleError(String className, String argumentName, Throwable t)
className
- the fully qualified class name of the currently exported workflow transition participant.argumentName
- the name of the argument that failed to export.t
- throwable when an object is not found.protected String transformUnhandledArgumentForExport(String className, String argName, String argValue, com.botronsoft.cmj.spi.configuration.ExportContext exportContext)
describeArguments()
. The default behavior is to
return the same value.className
- the fully qualified class name of the currently exported workflow transition participant.argName
- the name of the argument.argValue
- the raw value of the argument.exportContext
- the context of the export operation.protected String transformUnhandledArgumentForImport(String className, String argName, String argValue, com.botronsoft.cmj.spi.configuration.ImportContext importContext)
describeArguments()
. The default behavior is to
return the same value.className
- the fully qualified class name of the currently imported workflow transition participant.argName
- the name of the argument.argValue
- the value of the argument.importContext
- the context of the import operation.protected final ArgumentContainerDescriptor condition(String className)
className
- the fully qualified class name of the condition.protected final ArgumentContainerDescriptor validator(String className)
className
- the fully qualified class name of the validator.protected final ArgumentContainerDescriptor postFunction(String className)
className
- the fully qualified class name of the post-function.Copyright © 2022. All rights reserved.