Interacting with business processes via blueprint events using SFTP bulk operations.
The /blueprints/{blueprint-id}/events
folder allows you to interact with existing business processes through blueprint events using SFTP bulk operations.
For more details on how to use batch operations see the Jobs documentation for more details on how to use bulk/batch processing.
Enable
To enable batch processing for a Blueprint you must add a Trigger where the protocol is system
and the resource is jobs.line
. This will cause the folder to be created in the FTP server, for files to be dropped.
Folder
/blueprints/{blueprint-id}/events
Scopes
jobs:create business_processes:read, business_processes:update
Overview
Blueprint events enable you to trigger actions on business processes that were created through blueprints. This is useful for:
- Approving or rejecting pending processes
- Canceling active processes
- Sending reminders
- Updating process status
File Format
Upload CSV files to the /blueprints/{blueprint-id}/events
folder. The CSV should contain the business process ID and the event data.
Column order does not matter.
Required Fields
Field | Description | Required | Example |
---|---|---|---|
id | Business Process ID or idSeed value | Yes | 00000000-0000-0000-0000-000000000000 |
type | Event type to execute | Yes | reminder , resolve , fail |
Event Types
reminder
Areminder
message will be sent to the customer attached to the Business Process.resolve
Will cause the attached to the Business Process to have its status updated toresolved
.fail
Will cause the attached to the Business Process to have its status updated tofailed
.
Optional Fields
Field | Description | Example |
---|---|---|
schedule | Epoch milliseconds timestamp for execution | 1640995200000 |
Note: Timing will not be exact, delays of up to 20 minutes can occur depending on platform conditions.
Example CSV
This file is providing a resolve or failed status for an action with a known ID, and another row for a seed-id that would have been provided during Business Process creation time.
id,type
00000000-0000-0000-0000-000000000000,resolve
a-seed-value,failed
This is an example of a reminder file using id-seeds.
id,type,schedule
a-seed-value,reminder,1640995200000
Processing
For each valid record:
- ID validation: Verify business process exists or idSeed is valid
- Event type validation: Validate event type is supported
- Schedule validation: Validate timestamp if provided
- Event creation: Create event for business process
- Status update: Mark record as processed
Error Codes
Code | Description | Resolution |
---|---|---|
BUSINESS_PROCESS_NOT_FOUND | Business process not found | Check ID or idSeed |
INVALID_EVENT_TYPE | Invalid event type | Use valid event type |
INVALID_SCHEDULE | Invalid schedule timestamp | Check timestamp format |
EVENT_CREATION_FAILED | Failed to create event | Check business process status |
EVENT_NOT_ALLOWED | Event not allowed for current state | Check business process state |