Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/marp 99 enhance adobe esign for publishing on market place #13

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions adobe-esign-connector-demo/cms/cms_en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ Dialogs:
Agreement: Agreement
AgreementID: Agreement ID
AgreementID1: Agreement ID
BrowserNotSupportIframe: Your browser does not support iframes.
Close: Close
CreateAgreement: Create Agreement for 1 signer
CreateAgreement1: Create Agreement for 2 signers
Demo: Demo
Documents: Documents
DownloadCombine: Download combined document
LoadExisting: Load existing Agreement
Expand Down
254 changes: 1 addition & 253 deletions adobe-esign-connector-demo/processes/Demo.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,265 +5,13 @@
"data" : "com.axonivy.connector.adobe.esign.connector.demo.DemoData"
},
"elements" : [ {
"id" : "f0",
"type" : "RequestStart",
"name" : "uploadDocument.ivp",
"config" : {
"callSignature" : "uploadDocument",
"outLink" : "uploadDocument.ivp"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
"connect" : { "id" : "f8", "to" : "f7" }
}, {
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 672, "y" : 64 }
}
}, {
"id" : "f3",
"type" : "SubProcessCall",
"name" : "connector/TransientDocuments",
"config" : {
"processCall" : "connector/TransientDocuments:uploadDocument(java.io.File)",
"output" : {
"map" : {
"out" : "in",
"out.error" : "result.#error",
"out.fileId" : "result.#id"
}
},
"call" : {
"params" : [
{ "name" : "file", "type" : "java.io.File" }
],
"map" : {
"param.file" : "in.file"
}
}
},
"visual" : {
"at" : { "x" : 384, "y" : 64 }
},
"connect" : { "id" : "f6", "to" : "f5" }
}, {
"id" : "f5",
"type" : "Script",
"name" : "log",
"config" : {
"security" : "system",
"output" : {
"code" : [
"if(in.#error is initialized) {",
" ivy.log.error(in.error);",
"}"
]
}
},
"visual" : {
"at" : { "x" : 544, "y" : 64 }
},
"connect" : { "id" : "f2", "to" : "f1" }
}, {
"id" : "f7",
"type" : "Script",
"name" : "prepare file",
"config" : {
"output" : {
"code" : "in.file = new java.io.File(\"c:\\\\Users\\\\jpl\\\\Documents\\\\loremIpsumWithTag.pdf\");"
}
},
"visual" : {
"at" : { "x" : 224, "y" : 64 }
},
"connect" : { "id" : "f4", "to" : "f3" }
}, {
"id" : "f9",
"type" : "RequestStart",
"name" : "createAgreement.ivp",
"config" : {
"callSignature" : "createAgreement",
"outLink" : "createAgreement.ivp"
},
"visual" : {
"at" : { "x" : 96, "y" : 176 }
},
"connect" : { "id" : "f13", "to" : "f11" }
}, {
"id" : "f10",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 672, "y" : 176 }
}
}, {
"id" : "f11",
"type" : "SubProcessCall",
"name" : "connector/Agreements",
"config" : {
"call" : {
"params" : [
{ "name" : "agreement", "type" : "api.rest.v6.client.AgreementCreationInfo" }
],
"code" : [
"import api.rest.v6.client.AgreementsFormFieldGenerators;",
"import api.rest.v6.client.AgreementsFormFieldDescription.ContentTypeEnum;",
"import com.axonivy.connector.adobe.esign.connector.service.AdobeSignService;",
"",
"List<AgreementsFormFieldGenerators> generator;",
"generator.add(AdobeSignService.getInstance().createFormFieldWithAnchor(\"SIGNATURE_ANCHOR\", ContentTypeEnum.SIGNATURE, 0, 0));",
"List<String> documentIds;",
"documentIds.add(\"3AAABLblqZhBsqs68phWjsqCZhVGoV658jrcsTFeVqfqT_qyXnkXY6YvPLcwQMXUACiViSnDqtXibmIj55hZkFnlKZorpCyq9oI3W6CFukovBLY3AabxnyU0oGxx7UZNJVPmSWHlxnkFA5dLbr0MswUM1MPmwwskc4kcKgjXEmO43V9pREDT0ONJpYbgMJHbxPYIBBuh-u7sRs0vV6APDtHnkdwCo4R7zMkoK_udWIo5g9NRL_o-aNn26o7aDVjDzFDXMNJyvN3CQnFwrHzl5n4b06lPDneEIL5LISb1coMzZlw8dN5_QB3qLOG7TrTf057davR8WfQZnWeNbHv5vXW0XLe4NLXTZ5SREUpb2JIDv-o9NrPZqsA**\");",
"",
"param.agreement = AdobeSignService.getInstance().buildSimpleAgreementWithFormFields(\"MyFirstAgreementWithAnchor\", documentIds,",
" \"[email protected]\", ",
" generator);"
]
},
"processCall" : "connector/Agreements:createAgreement(api.rest.v6.client.AgreementCreationInfo)",
"output" : {
"map" : {
"out" : "in",
"out.agreementId" : "result.#agreementInfo.#id",
"out.error" : "result.#error"
}
}
},
"visual" : {
"at" : { "x" : 384, "y" : 176 }
},
"connect" : { "id" : "f17", "to" : "f12" }
}, {
"id" : "f12",
"type" : "Script",
"name" : "log",
"config" : {
"security" : "system",
"output" : {
"code" : [
"if(in.#error is initialized) {",
" ivy.log.error(in.error);",
"}"
]
}
},
"visual" : {
"at" : { "x" : 544, "y" : 176 }
},
"connect" : { "id" : "f16", "to" : "f10" }
}, {
"id" : "f14",
"type" : "RequestStart",
"name" : "getAgreement.ivp",
"config" : {
"callSignature" : "getAgreement",
"outLink" : "getAgreement.ivp"
},
"visual" : {
"at" : { "x" : 96, "y" : 288 }
},
"connect" : { "id" : "f18", "to" : "f15" }
}, {
"id" : "f15",
"type" : "SubProcessCall",
"name" : "connector/Agreements",
"config" : {
"processCall" : "connector/Agreements:getAgreementById(String)",
"call" : {
"params" : [
{ "name" : "agreementId", "type" : "String" }
],
"map" : {
"param.agreementId" : "\"CBJCHBCAABAAQP3LT2gNWaeN1pRMeoeVzX5wt0FK4rp_\""
}
}
},
"visual" : {
"at" : { "x" : 288, "y" : 288 }
},
"connect" : { "id" : "f20", "to" : "f19" }
}, {
"id" : "f19",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 480, "y" : 288 }
}
}, {
"id" : "f21",
"type" : "RequestStart",
"name" : "getSigningURLs.ivp",
"config" : {
"callSignature" : "getSigningURLs",
"outLink" : "getSigningURLs.ivp"
},
"visual" : {
"at" : { "x" : 96, "y" : 392 }
},
"connect" : { "id" : "f24", "to" : "f22" }
}, {
"id" : "f22",
"type" : "SubProcessCall",
"name" : "connector/Agreements",
"config" : {
"processCall" : "connector/Agreements:getSigningURLs(String,String)",
"call" : {
"params" : [
{ "name" : "agreementId", "type" : "String" },
{ "name" : "frameParent", "type" : "String" }
],
"map" : {
"param.agreementId" : "\"3AAABLblqZhBfSbYs8twdtGHmwnha8EHDVkANSjsr9OcOn7njc9HqC0Cq8J-WjiOkCzSFsCbt-rC0OF9OW37M_lB47n_XeRE7\""
}
}
},
"visual" : {
"at" : { "x" : 288, "y" : 392 }
},
"connect" : { "id" : "f25", "to" : "f23" }
}, {
"id" : "f23",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 480, "y" : 392 }
}
}, {
"id" : "f26",
"type" : "RequestStart",
"name" : "getUsers.ivp",
"config" : {
"callSignature" : "getUsers",
"outLink" : "getUsers.ivp"
},
"visual" : {
"at" : { "x" : 96, "y" : 496 }
},
"connect" : { "id" : "f30", "to" : "f27" }
}, {
"id" : "f27",
"type" : "SubProcessCall",
"name" : "connector/Users",
"config" : {
"processCall" : "connector/Users:call()"
},
"visual" : {
"at" : { "x" : 288, "y" : 496 }
},
"connect" : { "id" : "f29", "to" : "f28" }
}, {
"id" : "f28",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 480, "y" : 496 }
}
}, {
"id" : "f31",
"type" : "RequestStart",
"name" : "demo.ivp",
"config" : {
"callSignature" : "demo",
"outLink" : "demo.ivp",
"startName" : "Demo"
"startName" : "<%=ivy.cms.co(\"/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Demo\")%>"
},
"visual" : {
"at" : { "x" : 96, "y" : 592 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
<ui:composition template="/layouts/basic-10.xhtml">
<ui:composition template="/layouts/frame-10-full-width.xhtml">

<ui:define name="title">Demo</ui:define>
<ui:define name="title">#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Demo')}</ui:define>
<ui:define name="content">

<script type="text/javascript">
Expand Down Expand Up @@ -186,7 +186,7 @@
<br />
<div class="command-btns">
<p:commandLink id="close"
actionListener="#{ivyWorkflowView.cancel()}" value="Close" />
actionListener="#{ivyWorkflowView.cancel()}" value="#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/Close')}" />
</div>
</h:form>

Expand All @@ -195,7 +195,7 @@
draggable="true" maximizable="true">
<iframe id="signIframe" name="signIframe" src="#{data.signingURI}"
style="border-width: 0PX;" width="100%" height="100%">
<p>Your browser does not support iframes.</p>
<p>#{ivy.cms.co('/Dialogs/com/axonivy/connector/adobe/esign/connector/demo/Demo/BrowserNotSupportIframe')}</p>
</iframe>
</p:dialog>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
},
"output" : {
"code" : [
"import com.axonivy.connector.adobe.esign.connector.ui.util.FileUtils;",
"import com.axonivy.connector.adobe.esign.connector.util.FileUtils;",
"in.documentContent = FileUtils.toStreamedContent(in.filename, result.download);"
]
}
Expand Down Expand Up @@ -460,7 +460,7 @@
},
"output" : {
"code" : [
"import com.axonivy.connector.adobe.esign.connector.ui.util.FileUtils;",
"import com.axonivy.connector.adobe.esign.connector.util.FileUtils;",
"in.documentContent = FileUtils.toStreamedContent(in.filename, result.download);"
]
}
Expand Down
Loading
Loading