CreatePackage with 1 signer and 2 signing Groups
Thursday, January 28, 2016 at 06:17am
I attempting to create a document that has one signer by email, and 2 signing groups (lets name them Group1 and Group2)
The document has EXTRACTION enabled. This is important as I need it to extract the Signature bound and unbound fields out of the document.
The document for example has [Group1.Capture1] field where it needs to Capture the signature of a person in Group1.
Now - I have created Group1 and Group2 in the eSignLive account.
In my first attempt I Create the package and add the Group like
.WithSigner(SignerBuilder.NewSignerFromGroup(new GroupId("Group1"))
This fails the API returning a 500 error, someone has been notified.
So after trying I figure out it DOES work if you pass the actual group id.
.WithSigner(SignerBuilder.NewSignerFromGroup(new GroupId("fea96302-8e3d-43a9-8882-e28cb73e4b92"))
Works!
At least it gets past the Package creation and then proceeds to upload the document.
The upload document works and it gets the Document upload response back.
But now it proceeds to fail with a NullReference exception in SignatureConverter.cs ToSDKSignature()
public Signature ToSDKSignature() {
SignatureBuilder signatureBuilder = null;
foreach ( Silanis.ESL.API.Role role in package.Roles ) {
if ( role.Id.Equals( apiApproval.Role ) ) {
if ( isPlaceHolder( role ) )
{
signatureBuilder = SignatureBuilder.SignatureFor(new Placeholder(role.Id));
}
else if ( isGroupRole( role ) )
{
signatureBuilder = SignatureBuilder.SignatureFor(new GroupId(role.Signers [0].Group.Id));
}
else
{
signatureBuilder = SignatureBuilder.SignatureFor(role.Signers [0].Email);
}
}
}
The offending code is where it compares apiApprovalId with the role.Id
In the API response, the API returns the Group1 group signer with a Role.Id that equals it's Role Name!
While the Role.Id in the internal package is equal to the GUID.
So this seems inconsistent to me:
The API does not allow a submit package unless I submit the GUID of the GROUP to sign. Fair enough.
But then in the Response I get the GroupName back and the SDK has no way to resolve the Group Name with the GUID it gets back, resulting in signatureBuilder variable to be NULL after the loop.
Am I calling the API wrong? Should calling the API with a Group Name work because I am getting a HTTP status 500 back.
Is this a bug in the SDK?
Please advise!
Reply to: CreatePackage with 1 signer and 2 signing Groups
Friday, January 29, 2016 at 04:48amReply to: CreatePackage with 1 signer and 2 signing Groups
Friday, January 29, 2016 at 05:50amReply to: CreatePackage with 1 signer and 2 signing Groups
Friday, January 29, 2016 at 06:07am