Remember that any action or event available in workflow can be done with the callout and the SDK. However, the reverse is not true. In general, keep your callout routines as simple and fast as possible. When processes become long, see whether you can transfer them to a workflow assembly for asynchronous processing.
We would recommend the following guidelines to help you decide when to use a callout versus a workflow assembly:
Use callouts
To alter data prior to submission to the platform.
To take action after an update to an entity. (Workflow does not provide an easy trigger mechanism for the update event.)
When you need a synchronous transaction and an immediate response.
To take action before or after the merging of two records or the deletion of a record.
When accessing custom entities that are organization-owned. Workflow can be used only on entities that have user ownership.
Use workflow
For all asynchronous actions—transactions that can be completed without having the user wait for their completion. A typical asynchronous action might be to send an e-mail message after some condition is met. The user usually wouldn't have to wait until the system created and sent the message.
For simple common tasks. The Workflow Manager has a list of actions, already built and available for use, that require no custom application development. Available actions include creating new records (such as Activities or Notes), sending e-mail messages, and updating values on related entities.
To allow more configuration options to the user who is creating the workflow logic. Because the user builds the workflow rule with the rule editor, he or she can also alter it without necessarily requiring programmatic interaction.
When you need a user to manually execute the necessary logic.
No comments:
Post a Comment