I have added seal recipients in envelope. I have got electronic seals enabled on the account. I have added only a seal recipient and the Demo Seal guid in the recipientSignatureProvider.
<?xml version="1.0" encoding="UTF-8"?>
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<emailSubject>Email Subject.</emailSubject>
<status>sent</status>
<documents>
<document>
<name>1</name>
<documentId>1</documentId>
</document>
</documents>
<recipients>
<seals>
<sealSign>
<recipientId>1</recipientId>
<routingOrder>1</routingOrder>
<recipientSignatureProviders>
<recipientSignatureProvider>
<sealName>a6176xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sealName>
</recipientSignatureProvider>
</recipientSignatureProviders>
</sealSign>
</seals>
</recipients>
</envelopeDefinition>
I get following error in the envelope audit.
Protect and Sign Demo (Client ID: dde5xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) replied: Error - ILLEGAL_DATA - Http error connecting to https://demo.docusign.net/restapi/vdev/signature/signhashsessioninfo Code 400 {"errorCode":"UNSPECIFIED_ERROR","message":"An Error Occurred."}
What am I doing wrong ?
The envelope status stays as "sent".
My expectation is it should be "complete" and seal applied in the document.
The vdev path is limited to DocuSign applications. You should be using .../v2.1
Also, you need the seal functionality to be enabled for your demo sandbox account. Contact go-live#docusign.com (include your account id) to have this done.
I am trying to create a a draft envelope with a document and a recipient through DocuSign API Explorer using my DocuSign Developer Sandbox account.
Despite a SUCCESS response, the actual envelope contains neither the document or the recipient I included in the Request. Where am I going wrong?
Here is the Request XML:
<envelopeDefinition
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">
<documents>
<documentBase64><Base64BytesHere></documentBase64>
</documents>
<emailSubject>Test from API Explorer</emailSubject>
<recipients>
<signers>
<email>nobody#nobody.com</email>
<name>John Smith</name>
</signers>
</recipients>
<status>created</status>
</envelopeDefinition>
Here is the empty envelope screenshot
You're missing some parameters for the document and recipient objects, for instance you need to add a documentId and documentName for the document in addition to the document bytes.
Here's what a full XML request should look like:
<envelopeDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
<emailSubject>Test Subject</emailSubject>
<documents>
<document>
<name>document.pdf</name>
<documentId>1</documentId>
<documentBase64><Base64BytesHere></documentBase64>
</document>
</documents>
<recipients>
<signers>
<tabs>
<signHereTabs>
<signHereTab>
<pageNumber>1</pageNumber>
<documentId>1</documentId>
<xPosition>100</xPosition>
<yPosition>100</yPosition>
</signHereTab>
</signHereTabs>
</tabs>
<routingOrder>1</routingOrder>
<recipientId>1</recipientId>
<name>My Name</name>
<email>email#email.com</email>
</signers>
</recipients>
<status>created</status>
</envelopeDefinition>
We are trying to determine if there is a way to obtain the timestamp of when a Carbon Copy, "Envelope Signed" or "Envelope Completed" email is sent with a json api instead of xml.
We have tested using Docusign connect by selecting the "Envelope Signed" and "Envelope Completed" events under "Send information on these envelope events" in the Docusign console.
Also, when the document is signed, we receive the expected post request to our connect endpoint which includes the following (private info removed) and are wondering if the timestamp in the "Sent" tag means that the carbon copy email was actually sent at that time and therefore we can use it for auditing purposes.
<RecipientStatus>
<Type>CarbonCopy</Type>
<Email>bob#example.com</Email>
<UserName>Bob</UserName>
<RoutingOrder>2</RoutingOrder>
<Sent>2015-07-08T16:14:18.88</Sent>
<DeclineReason xsi:nil="true" />
<Status>Completed</Status>
<RecipientIPAddress />
<CustomFields />
<AccountStatus>Active</AccountStatus>
<RecipientId>dc9521c4-b11d-426c-b409-326b985e823b</RecipientId>
</RecipientStatus>
thanks
PR
I have the next workflow:
An user fills in some fields configured in Dynamic Data List and clicks submit.
An user with the role Petition analyzer can assign the petition to himself. Then he can do the next three things: resolve it - notifying the creator about this, asking for details - the petition returns to the creator, forward it to an organization.
The organization, in turn, can resolve the petition or ask for details.
I have created two users, user1 and user2 who belong to the organization and have the role Security role.
Everything works great except the time when the petition analyzer decides to forward the petition to an organization. The task does not appear under "My Workflow tasks" menu for any of the users belonging to the organization.
If I assign the "forwarded to an organization" task to a petition analyzer, the petition analyzer receives the task so, I believe, the workflow is correctly created. Or not ... it's your decision to make.
The role, users, organization creation I'm worried about. I have created a role "Security role" of type "organization", an organization called "Organization A" and the users: user1, user2 are added to the Organization A and assigned the role "Security role". When I log in as user1 I expect to find the task and be notified about it which does not happen.
I am waiting for your sugesstions. Thank you.
Here is my workflow:
<workflow-definition
xmlns="urn:liferay.com:liferay-workflow_6.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:liferay.com:liferay-workflow_6.2.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_2_0.xsd">
<name>Petition workflow</name>
<description>Petition Workflow</description>
<version>1</version>
<state>
<name>created</name>
<metadata>
<![CDATA[{"xy":[36,51]}]]>
</metadata>
<initial>true</initial>
<transitions>
<transition>
<name>sent it to be analyzed</name>
<target>sent it to be analyzed</target>
</transition>
</transitions>
</state>
<task>
<name>asking for details</name>
<metadata>
<![CDATA[{"transitions":{"resubmit":{"bendpoints":[[303,140]]}},"xy":[328,199]}]]>
</metadata>
<actions>
<action>
<name>reject</name>
<script>
<![CDATA[
Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("denied"), workflowContext);
Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("pending"), workflowContext);
]]>
</script>
<script-language>javascript</script-language>
<execution-type>onAssignment</execution-type>
</action>
<notification>
<name>Notification creator that the petition was modified</name>
<template>Petition was modified by ${userName}. Please make the needed changes and resubmit.</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<notification-type>user-notification</notification-type>
<execution-type>onAssignment</execution-type>
</notification>
</actions>
<assignments>
<user />
</assignments>
<transitions>
<transition>
<name>Resubmit</name>
<target>sent it to be analyzed</target>
</transition>
</transitions>
</task>
<task>
<name>sent it to be analyzed</name>
<metadata>
<![CDATA[{"xy":[168,36]}]]>
</metadata>
<actions>
<notification>
<name>Notification petition analyzer that he needs to analyze a petition</name>
<template>${userName} sent you a ${entryType}.</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<notification-type>user-notification</notification-type>
<execution-type>onAssignment</execution-type>
</notification>
<notification>
<name>Notification creator, through email, that the analysis is complete</name>
<template>
The petition has been analyzed and has the following commentaries: ${taskComments}.</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<recipients>
<user />
</recipients>
<execution-type>onExit</execution-type>
</notification>
</actions>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Petition analyzer</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>Resolve petition</name>
<target>approved</target>
</transition>
<transition>
<name>Ask for details</name>
<target>asking for details</target>
<default>false</default>
</transition>
<transition>
<name>Forward to an organization</name>
<target>forwarded to an organization</target>
</transition>
</transitions>
</task>
<task>
<name>forwarded to an organization</name>
<metadata>
<![CDATA[{"xy":[168,36]}]]>
</metadata>
<actions>
<notification>
<name>Notification user belonging to an organization that he received a task</name>
<template>${userName} sent you a ${entryType}.</template>
<template-language>freemarker</template-language>
<notification-type>email</notification-type>
<notification-type>user-notification</notification-type>
<execution-type>onAssignment</execution-type>
</notification>
<notification>
<name>Notification creator, through email, when the analysis is completed</name>
<template>
The petition has been sent to be analyzed and has the following commentaries: ${taskComments}.</template>
<template-language>freemarker</template-language>
<notification-type>user-notification</notification-type>
<notification-type>email</notification-type>
<recipients>
<user />
</recipients>
<execution-type>onAssignment</execution-type>
</notification>
</actions>
<assignments>
<roles>
<role>
<role-type>organization</role-type>
<name>Security role</name>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>Resolve petition</name>
<target>approved</target>
</transition>
<transition>
<name>Ask for details</name>
<target>asking for details</target>
<default>false</default>
</transition>
</transitions>
</task>
<state>
<name>approved</name>
<metadata>
<![CDATA[
{"xy":[380,51]}
]]>
</metadata>
<actions>
<action>
<name>approve</name>
<script>
<![CDATA[
import com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil;
import com.liferay.portal.kernel.workflow.WorkflowConstants;
WorkflowStatusManagerUtil.updateStatus(WorkflowConstants.toStatus("approved"), workflowContext);
]]>
</script>
<script-language>groovy</script-language>
<execution-type>onEntry</execution-type>
</action>
<notification>
<name>Notification creator that petition has been approved</name>
<template>
The petition has been approved with the following comentaries: ${taskComments}.</template>
<template-language>freemarker</template-language>
<notification-type>user-notification</notification-type>
<recipients>
<user />
</recipients>
<execution-type>onEntry</execution-type>
</notification>
</actions>
</state>
</workflow-definition>
I have took while to look for your workflow definition and test it a bit on my local environment. I managed to reproduce same effect. Even all tasks were assigned to right users, notification for organization roles seemed to not working at all.
Here is what I managed to see after some deeper research:
Web Contents edited within another organization (or just another site) than the one connected with role Security role makes notifications not working for organization roles.
From other hand if you do following:
Enable your workflow definition for given organization (the same which is set to Security role)
Create Web Content within given organization (the same as above)
All notifications seems to be working!
This is quite strange since, whole workflow seems to be working, no matter what organization it uses, but notifications seems to be closely related to organization, of processed tasks. This is either a bug or a feature.
Update
Check out this pat of code WorkflowTaskManagerImpl class:
if ((role.getType() == RoleConstants.TYPE_SITE) ||
(role.getType() == RoleConstants.TYPE_ORGANIZATION)) {
List<UserGroupRole> userGroupRoles =
UserGroupRoleLocalServiceUtil.
getUserGroupRolesByGroupAndRole(
kaleoTaskInstanceToken.getGroupId(),
kaleoTaskAssignment.getAssigneeClassPK());
for (UserGroupRole userGroupRole : userGroupRoles) {
pooledActors.add(userGroupRole.getUserId());
}
kaleoTaskInstanceToken.getGroupId() is based on groupId which was saved in kaleotaskinstancetoken entry. This means, as I have mentioned above:
If you create Web Content in different Organization than the one which is assigned to your organization role, this part of code won't be able to find such role. As consequence no single notification will be send, for this task.
This is either bug and should be fixed by Liferay, or some sort of feature allowing to pass Organization roles to workflow defintion not connected directly with organization.
When I send a SOAP request to DocuSign it is showing an error: This Account lacks sufficient permissions. In-Session permission required when specifying a captive recipient.
Full response XML is:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<wsa:MessageID>urn:uuid:9f406870-dc55-441d-b5ff-8317166636b9</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:b572d1a4-b8b5-4254-8f1d-7fd46fb593f1</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-656764ea-c0f0-4074-88b1-dbffae666a83">
<wsu:Created>2013-08-01T18:00:46Z</wsu:Created>
<wsu:Expires>2013-08-01T18:05:46Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>This Account lacks sufficient permissions. In-Session permission required when specifying a captive recipient.</faultstring>
<faultactor>https://www.docusign.net/api/3.0/dsapi.asmx</faultactor>
<detail>
<ErrorCode xmlns="missing in Web.Config">111</ErrorCode>
<ErrorReason xmlns="missing in Web.Config">This Account lacks sufficient permissions.</ErrorReason>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
A request we send is:
User-Agent: SFDC-Callout/28.0
X-DocuSign-Authentication: <DocuSignCredentials><Username>There is a user name</Username><Password>There is a password</Password><IntegratorKey>There is an integrator key</IntegratorKey></DocuSignCredentials>
Accept: text/xml
Content-Type: text/xml
charset: UTF-8
SOAPAction: "http://www.docusign.net/API/3.0/CreateAndSendEnvelope"
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header />
<env:Body>
<CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
<Envelope>
<AccountId>There is an accountId</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>Bayfront - Smoke free environment form - Antony.pdf</Name>
<PDFBytes>There is an encoded body</PDFBytes>
<FileExtension>pdf</FileExtension>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName>mikhail</UserName>
<Email>mikhail.ivanov#targetrecruit.net</Email>
<Type>Signer</Type>
<AccessCode xsi:nil="true" />
<RequireIDLookup>false</RequireIDLookup>
<CaptiveInfo>
<ClientUserId>1</ClientUserId>
</CaptiveInfo>
<RoutingOrder>1</RoutingOrder>
<RoleName>Signer</RoleName>
</Recipient>
</Recipients>
<Tabs />
<Subject>Please Sign this Document: </Subject>
<EmailBlurb>This is my new eSignature service, it allows me to get your signoff without having to fax, scan, retype, refile and wait forever</EmailBlurb>
<CustomFields>
<CustomField>
<Name>DSFSSourceObjectId</Name>
<Show>false</Show>
<Required>false</Required>
<Value>Credential ID</Value>
</CustomField>
</CustomFields>
</Envelope>
</CreateAndSendEnvelope>
</env:Body>
</env:Envelope>
What can be the reason? How should I fix it?
DocuSign developer sandboxes have this enabled by default so you can test Embedded Signing (and sending, etc) before going live.
In terms of live production accounts- not all accounts have embedding enabled so ensure you have purchased an account that has it. If you are getting this error in production you most likely need to upgrade.