Skip to content

Commit

Permalink
XIVY-12667 Added option to send another message from result screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-fhe committed Nov 2, 2023
1 parent 396215b commit 8b6ded8
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ publicKey String #field
publicKey PERSISTENT #fieldModifier
privatekey String #field
privatekey PERSISTENT #fieldModifier
sendAnother Boolean #field
sendAnother PERSISTENT #fieldModifier
56 changes: 42 additions & 14 deletions threema-connector-demo/processes/ThreemaDemoProcess.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"id" : "f4",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 768, "y" : 168 }
"at" : { "x" : 936, "y" : 168 }
}
}, {
"id" : "f5",
Expand Down Expand Up @@ -78,7 +78,7 @@
}
},
"visual" : {
"at" : { "x" : 464, "y" : 168 },
"at" : { "x" : 512, "y" : 168 },
"icon" : "res:/webContent/icons/threema-icon_black.png"
},
"connect" : { "id" : "f18", "to" : "f7" }
Expand All @@ -91,10 +91,10 @@
"startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
"output" : {
"map" : {
"out" : [
"in",
"result.sendDemoMessageData"
]
"out" : "result.sendDemoMessageData",
"out.plainMessage" : "\"\"",
"out.receiver" : "\"\"",
"out.type" : "\"\""
}
},
"call" : {
Expand All @@ -107,9 +107,9 @@
}
},
"visual" : {
"at" : { "x" : 640, "y" : 168 }
"at" : { "x" : 688, "y" : 168 }
},
"connect" : { "id" : "f16", "to" : "f4" }
"connect" : { "id" : "f24", "to" : "f23" }
}, {
"id" : "f8",
"type" : "RequestStart",
Expand All @@ -127,7 +127,7 @@
"id" : "f9",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 768, "y" : 280 }
"at" : { "x" : 936, "y" : 280 }
}
}, {
"id" : "f10",
Expand Down Expand Up @@ -185,7 +185,7 @@
}
},
"visual" : {
"at" : { "x" : 464, "y" : 280 },
"at" : { "x" : 512, "y" : 280 },
"icon" : "res:/webContent/icons/threema-icon_black.png"
},
"connect" : { "id" : "f17", "to" : "f13" }
Expand All @@ -196,6 +196,14 @@
"config" : {
"dialogId" : "threema.connector.demo.ResultPage",
"startMethod" : "start(threema.connector.demo.sendDemoMessageData)",
"output" : {
"map" : {
"out" : "in",
"out.plainMessage" : "\"\"",
"out.receiver" : "\"\"",
"out.type" : "\"\""
}
},
"call" : {
"params" : [
{ "name" : "sendDemoMessageData", "type" : "threema.connector.demo.sendDemoMessageData" }
Expand All @@ -206,9 +214,9 @@
}
},
"visual" : {
"at" : { "x" : 640, "y" : 280 }
"at" : { "x" : 688, "y" : 280 }
},
"connect" : { "id" : "f14", "to" : "f9" }
"connect" : { "id" : "f27", "to" : "f14" }
}, {
"id" : "f0",
"type" : "RequestStart",
Expand All @@ -225,7 +233,7 @@
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 768, "y" : 368 }
"at" : { "x" : 936, "y" : 368 }
}
}, {
"id" : "f2",
Expand Down Expand Up @@ -267,8 +275,28 @@
}
},
"visual" : {
"at" : { "x" : 464, "y" : 368 }
"at" : { "x" : 520, "y" : 368 }
},
"connect" : { "id" : "f21", "to" : "f1" }
}, {
"id" : "f23",
"type" : "Alternative",
"visual" : {
"at" : { "x" : 840, "y" : 168 }
},
"connect" : [
{ "id" : "f16", "to" : "f5", "via" : [ { "x" : 840, "y" : 104 }, { "x" : 272, "y" : 104 } ], "condition" : "in.sendAnother" },
{ "id" : "f29", "to" : "f4" }
]
}, {
"id" : "f14",
"type" : "Alternative",
"visual" : {
"at" : { "x" : 840, "y" : 280 }
},
"connect" : [
{ "id" : "f31", "to" : "f10", "via" : [ { "x" : 840, "y" : 216 }, { "x" : 272, "y" : 216 } ], "condition" : "in.sendAnother" },
{ "id" : "f30", "to" : "f9" }
]
} ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@

<br />
<div class="command-btns">
<p:commandLink id="cancel"
actionListener="#{ivyWorkflowView.cancel()}" value="Cancel" />
<p:commandButton id="send"
actionListener="#{logic.sendAnother}" value="Send another Message" icon="pi pi-send"/>
<p:commandButton id="proceed" actionListener="#{logic.close}"
value="Proceed" update="form" icon="pi pi-check" />
value="Close" update="form" icon="pi pi-times" />
</div>
</h:form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@
"type" : "HtmlDialogEventStart",
"name" : "close",
"config" : {
"guid" : "18B23815CA6B079E"
"guid" : "18B23815CA6B079E",
"output" : {
"map" : {
"out" : "in",
"out.sendDemoMessageData.sendAnother" : "false"
}
}
},
"visual" : {
"at" : { "x" : 96, "y" : 160 }
Expand Down Expand Up @@ -80,5 +86,22 @@
"at" : { "x" : 208, "y" : 64 }
},
"connect" : { "id" : "f7", "to" : "f1" }
}, {
"id" : "f8",
"type" : "HtmlDialogEventStart",
"name" : "sendAnother",
"config" : {
"guid" : "18B8F438B7519CB7",
"output" : {
"map" : {
"out" : "in",
"out.sendDemoMessageData.sendAnother" : "true"
}
}
},
"visual" : {
"at" : { "x" : 96, "y" : 224 }
},
"connect" : { "id" : "f9", "to" : "f4" }
} ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<p:commandLink id="cancel"
actionListener="#{ivyWorkflowView.cancel()}" value="Cancel" />
<p:commandButton id="proceed" actionListener="#{logic.close}"
value="Send" update="form" icon="pi pi-check" />
value="Send" update="form" icon="pi pi-send" />
</div>
</h:form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<p:commandLink id="cancel"
actionListener="#{ivyWorkflowView.cancel()}" value="Cancel" />
<p:commandButton id="proceed" actionListener="#{logic.close}"
value="Send" update="form" icon="pi pi-check" />
value="Send" update="form" icon="pi pi-send" />
</div>
</h:form>

Expand Down
3 changes: 2 additions & 1 deletion threema-connector-product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Credentials and credits are required to send messages. The credentials can be cr

## Setup
1. Generate a new key pair using the "createKeyPair" process.
2. Create "End-to-End Threema ID" at: [Request new ID](https://gateway.threema.ch/en/id-request) <br>
2. Create "End-to-End Threema ID" at: [Request new ID](https://gateway.threema.ch/en/id-request) <br>
Free credits for testing purposes can be requestet at [[email protected]](mailto:[email protected]) <br>
3. Add the following variables to your Axon Ivy Project:

```
Expand Down

0 comments on commit 8b6ded8

Please sign in to comment.