-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attachment rest callable SubProcess (#11)
* attachment rest callable SubProcess * tag - connector
- Loading branch information
Showing
3 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
talentlink-connector/dataclasses/rest/AttachmentData.ivyClass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AttachmentData #class | ||
rest #namespace | ||
attachment com.axonivy.connector.talentlink.entity.Attachment #field | ||
attachmentId Long #field | ||
error ch.ivyteam.ivy.bpm.error.BpmError #field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"format" : "10.0.0", | ||
"id" : "1882E31A11B7E690", | ||
"kind" : "CALLABLE_SUB", | ||
"config" : { | ||
"data" : "rest.AttachmentData" | ||
}, | ||
"elements" : [ { | ||
"id" : "f0", | ||
"type" : "CallSubStart", | ||
"name" : "getAttachment(Long)", | ||
"config" : { | ||
"callSignature" : "getAttachment", | ||
"input" : { | ||
"params" : [ | ||
{ "name" : "attachmentId", "type" : "Long" } | ||
], | ||
"map" : { | ||
"out.attachmentId" : "param.attachmentId" | ||
} | ||
}, | ||
"result" : { | ||
"params" : [ | ||
{ "name" : "attachment", "type" : "com.axonivy.connector.talentlink.entity.Attachment" }, | ||
{ "name" : "error", "type" : "ch.ivyteam.ivy.bpm.error.BpmError" } | ||
], | ||
"map" : { | ||
"result.attachment" : "in.#attachment", | ||
"result.error" : "in.#error" | ||
} | ||
}, | ||
"tags" : "connector" | ||
}, | ||
"visual" : { | ||
"at" : { "x" : 96, "y" : 64 } | ||
}, | ||
"connect" : { "id" : "f4", "to" : "f5" } | ||
}, { | ||
"id" : "f1", | ||
"type" : "CallSubEnd", | ||
"visual" : { | ||
"at" : { "x" : 352, "y" : 64 } | ||
} | ||
}, { | ||
"id" : "f5", | ||
"type" : "RestClientCall", | ||
"name" : "Attachment", | ||
"config" : { | ||
"path" : "/candidate/attachment/{documentId}", | ||
"clientId" : "d8e4652e-41d5-4023-90c5-5c822b8600e2", | ||
"clientErrorCode" : "ivy:error:rest:client", | ||
"statusErrorCode" : "ivy:error:rest:client", | ||
"responseMapping" : { | ||
"out.attachment" : "result" | ||
}, | ||
"templateParams" : { | ||
"documentId" : "in.attachmentId" | ||
}, | ||
"resultType" : "com.axonivy.connector.talentlink.entity.Attachment" | ||
}, | ||
"visual" : { | ||
"at" : { "x" : 232, "y" : 64 } | ||
}, | ||
"boundaries" : [ { | ||
"id" : "f10", | ||
"type" : "ErrorBoundaryEvent", | ||
"config" : { | ||
"output" : { | ||
"map" : { | ||
"out" : "in", | ||
"out.error" : "error" | ||
} | ||
} | ||
}, | ||
"visual" : { | ||
"at" : { "x" : 264, "y" : 96 } | ||
}, | ||
"connect" : { "id" : "f3", "to" : "f1" } | ||
} ], | ||
"connect" : { "id" : "f2", "to" : "f1" } | ||
} ] | ||
} |
42 changes: 42 additions & 0 deletions
42
talentlink-connector/src/com/axonivy/connector/talentlink/entity/Attachment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.axonivy.connector.talentlink.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Entity for Attachment received from Rest call | ||
*/ | ||
public class Attachment { | ||
@JsonProperty("fileName") | ||
private String fileName = null; | ||
|
||
@JsonProperty("mimeType") | ||
private String mimeType = null; | ||
|
||
@JsonProperty("base64EncodedContent") | ||
private String base64EncodedContent = null; | ||
|
||
public String getFileName() { | ||
return fileName; | ||
} | ||
|
||
public void setFileName(String fileName) { | ||
this.fileName = fileName; | ||
} | ||
|
||
public String getMimeType() { | ||
return mimeType; | ||
} | ||
|
||
public void setMimeType(String mimeType) { | ||
this.mimeType = mimeType; | ||
} | ||
|
||
public String getBase64EncodedContent() { | ||
return base64EncodedContent; | ||
} | ||
|
||
public void setBase64EncodedContent(String base64EncodedContent) { | ||
this.base64EncodedContent = base64EncodedContent; | ||
} | ||
|
||
} |