-
Notifications
You must be signed in to change notification settings - Fork 82
script
Icon |
|
---|---|
Use When |
A custom action should be performed that can be written using Groovy |
Samples |
See Script Templates |
Description |
The script component executes one or more configurable groovy scripts. Groovy scripts can be configured to run at different points in the component lifecycle including Component Initialization (onInit), Inbound message arrival (onHandleMessage), Successful flow completion (onSuccess), and Flow completion with error (onError). The different run points are implemented as methods in Script Helper. All methods and fields in There are several Templates that can be referenced or used as a starting point to building your script. |
Inbound Message Type |
Any Message Type |
Output Message Type |
Any Message Type |
Control Message Handling |
Input: This component handles control messages based on what is defined in the various script methods. Output: Output messages will be determined by the logic in this component. |
Name | Description |
---|---|
Resource |
A resource that can be accessed and utilized by the script. |
Whether to forward failed messages and continue processing. This is the name of a linked component to forward the failed messages to. |
|
Import Statements |
Import statements for external dependencies |
Methods |
Helper methods to be used by the script process |
Init Script |
The script to be executed upon component initialization |
Handle Msg Script |
The script to be executed upon receipt of an inbound message |
Ended with Success Script |
The script to be executed upon successful completion of the flow |
Ended with Error Script |
The script to be executed upon a failed completion of the flow. Note: this will not be called if a flow uses an Assert component to capture an error. This only triggers on regular flow errors. |
Tip
|
The component object can be used to access the components runtime information. This can be used to access the flow parameters. Example: String store = component.resolveFlowParams('$(store)'); |