Launching a Transaction
Once you have the workflow ID and all the data needed to be injected into the final API call, you can launch the transaction.
var req = new WorkflowRequestModel()
{
Workflows = new List<object> { myWorkflow }
};
var api = new WorkflowsApi(myRestEndpointUrl);
var results = api.GetWorkflows(req, apiKey, apiSecret, apiUsername, apiPassword);
if (results.IsSuccessful.Value)
{
var transaction = results.Transactions[0];
// Update or Inject all unique launch data here
// =============================================
transaction.Description = "My Altered Description";
transaction.Participants[0].FullName = "<Inject Signer Name Here>";
transaction.Participants[0].EmailAddress = "<Inject Email Address Here>";
// =============================================
var transactionReq = new TransactionCreateRequestModel()
{
Transactions = new List<TransactionCreateModel> { transaction }
};
var transactionApi = new TransactionsApi(myTransactionRestEndpointUrl);
var transactionResults = transactionApi.CreateTransactions(transactionReq, apiKey, apiSecret, apiUsername, apiPassword);
if (transactionResults.IsSuccessful.Value)
{
// Do work
}
}
Getting Launch Rules
Using the Workflow ID, you can get all the properties and rules required to launch the workflow. Since most workflows require some user entered data, you'll need to know what data to collect and the Launch Rules API will provide that for you.
Signature Placement for PDF Documents
For any Task that is of the Signature or Initial task type, you have three different methods in which to place the element on the PDF document. You can also use these three methods to place the Acknowledgement task type, however, the Acknowledgement task type does not stamp any visible text or markings on the final PDF. With the Signature and Initial task types, you have the option of including Additional Signature Block Data along with the signature placement and these data can be placed using the exact same methods.