improved
Business Process scheduling and expiration
11 months ago by ReadMe API
The schedule
, expiration
, status
, and callback
properties of a business process have more capabilities around being updated. These new features are available while updating or creating a business process.
Update Examples
Here are a couple of examples to help get the creative juices flowing.
{
"callback": "https://app.example.com/callback",
"expiration": 1729319125987
}
{
"status": "in-progress",
"expiration": 1729319125987
}
{
"schedule": 1729319125987
}
{
"schedule": "5d", // business process publish, after 5 days from current time
"expiration": "48h" // expiration will be after 2 days from schedule time.
}
Status
Not available for closed business processesThese properties cannot be modified once the business process is
failed
orresolved
.
- The
status
can be changed fromscheduled
toin-progress
but not vice-versa. Changing it toin-progress
will cause the business process to execute immediately (there may be up to a 10-minute delay). - You can continue to change a business process from
in-progress
to eitherresolved
orfailed
.
Schedule
- You can only update the
schedule
property if the business process is notin-progress
, meaning thebusinessProcess.status
must bescheduled
. scheduled
can be updated to allow duration like (5d
or48h)
d = day, h = hour or a point in time (timestamp).- You cannot pass a timestamp that's in the past. It must be greater than the current time; otherwise, an error will be returned.
- You cannot pass a timestamp after the expiration date provided. It must be greater than the current time but lesser than the expiration time; otherwise, an error will be returned.
- You cannot pass a timestamp or duration greater than 365 days from the current time or business process
createdOn
time. scheduled
allows you to zero out or put any time within 10 minutes of the current time (after the current time) to cause the event to be executed immediately. Otherwise, it will continue executing using the existing logic, which will execute within 20 minutes of the defined time.
Expiration
expiration
can be updated to allow duration like (5d
or48h)
d = day, h = hour or a point in time (timestamp).- You cannot pass a timestamp that's in the past. It must be greater than the current time, or an error will occur.
- You cannot pass a timestamp before the
scheduled
time if business process status isscheduled
. It must be greater than the current time orscheduled
time if it exists; otherwise, an error will be returned. - You cannot pass a timestamp or duration greater than 365 days from the current time or business process
createdOn
time or scheduled time if it exists. expiration
allows you to zero out or put any time within 10 minutes of the current time (after the current time) if business process status isin-progress
, to cause the event to be executed immediately. Otherwise, it will continue executing using the existing logic, which will execute within 20 minutes of the defined time.