-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleaning and upgrade tasklist and operate clients to manage toke…
…n expiration
- Loading branch information
Showing
45 changed files
with
1,062 additions
and
623 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,16 +1,21 @@ | ||
# Process Solution Template for Camunda Platform 8 using Keycloak, Java and Spring Boot | ||
|
||
## Directory Server | ||
To run it locally, you'll need a Directory Server and a Camunda 8 platform. | ||
If you don't have a Directory Server, you can follow the documentation enclosed in LocalDirectoryServer.docx and import the sailors.LDIF file. | ||
|
||
## Camunda 8 platform | ||
If you don't have a Camunda 8 platform, you can use the Camunda provided docker-compose file : https://raw.githubusercontent.com/camunda/camunda-platform/d7848cc66f4dee79ee1ea73efa7eb9684c2dc748/docker-compose.yaml | ||
|
||
Then you'll need to federate the Directory users in your Keycloak (follow the WorkshopSupport.docx documentation) | ||
To have some "Admin" users, you'll need to configure them manually in Keycloak. To do so, connect to Keycloak as an Admin | ||
localhost:18080 (admin:admin) | ||
## A few configurations | ||
|
||
* Then you'll need to federate the Directory users in your Keycloak (follow the WorkshopSupport.docx documentation) | ||
|
||
* To have some "Admin" users allowed to access **http://localhost:8080/admin/index.html**, you'll need to configure them manually in Keycloak. To do so, connect to Keycloak as an Admin | ||
localhost:18080 (admin:admin) | ||
Navigate to Roles and create an "Admin" role. | ||
Navigate to Users and assign the "Admin" role to someone (for example "Demo"). | ||
**Be careful, if you use demo as a normal user, you should provide him an email in Keycloak** | ||
|
||
This user will then be able to access http://localhost:8080/amdin/index.html | ||
* If you want to send mails or store documents in drive, you'll need to add a **client_secret_google_api.json** in your resources folder. This can be done from https://console.cloud.google.com/apis/credentials | ||
|
||
If you want to send mails or store documents in drive, you'll need to add a client_secret_google_api.json in your resources folder. This can be done from https://console.cloud.google.com/apis/credentials |
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
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
187 changes: 114 additions & 73 deletions
187
src/main/java/org/example/camunda/process/solution/ProcessVariables.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 |
---|---|---|
@@ -1,86 +1,127 @@ | ||
package org.example.camunda.process.solution; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
|
||
@JsonInclude(Include.NON_NULL) | ||
public class ProcessVariables { | ||
|
||
private String intialMessage; | ||
private String assignee1; | ||
private String assignee2; | ||
private List<Map<String, String>> comments; | ||
private Map<String, Object> file; | ||
private String date; | ||
|
||
public String getIntialMessage() { | ||
return intialMessage; | ||
} | ||
|
||
public void setIntialMessage(String intialMessage) { | ||
this.intialMessage = intialMessage; | ||
} | ||
|
||
public String getAssignee1() { | ||
return assignee1; | ||
} | ||
|
||
public ProcessVariables setAssignee1(String assignee1) { | ||
this.assignee1 = assignee1; | ||
return this; | ||
} | ||
|
||
public String getAssignee2() { | ||
return assignee2; | ||
} | ||
|
||
public ProcessVariables setAssignee2(String assignee2) { | ||
this.assignee2 = assignee2; | ||
return this; | ||
} | ||
|
||
public List<Map<String, String>> getComments() { | ||
return comments; | ||
} | ||
|
||
public ProcessVariables setComments(List<Map<String, String>> comments) { | ||
this.comments = comments; | ||
return this; | ||
} | ||
|
||
public Map<String, Object> getFile() { | ||
return file; | ||
} | ||
|
||
public ProcessVariables setFile(Map<String, Object> file) { | ||
this.file = file; | ||
return this; | ||
} | ||
|
||
public String getDate() { | ||
return date; | ||
} | ||
|
||
public ProcessVariables setDate(String date) { | ||
this.date = date; | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, new MultilineRecursiveToStringStyle() { | ||
public ToStringStyle withShortPrefixes() { | ||
this.setUseShortClassName(true); | ||
this.setUseIdentityHashCode(false); | ||
return this; | ||
} | ||
private String requestType; | ||
private String subject; | ||
private String initialMessage; | ||
private String date; | ||
private String lastComment; | ||
private String lastAdhocTaskType; | ||
private List<Map<String, String>> comments; | ||
private Map<String, Object> attachment; | ||
private String actionResult; | ||
private Boolean resolved; | ||
|
||
public String getRequestType() { | ||
return requestType; | ||
} | ||
|
||
public ProcessVariables setRequestType(String requestType) { | ||
this.requestType = requestType; | ||
return this; | ||
} | ||
|
||
public String getSubject() { | ||
return subject; | ||
} | ||
|
||
public ProcessVariables setSubject(String subject) { | ||
this.subject = subject; | ||
return this; | ||
} | ||
|
||
public String getInitialMessage() { | ||
return initialMessage; | ||
} | ||
|
||
public ProcessVariables setInitialMessage(String intialMessage) { | ||
this.initialMessage = intialMessage; | ||
return this; | ||
} | ||
|
||
public String getDate() { | ||
return date; | ||
} | ||
|
||
public ProcessVariables setDate(String date) { | ||
this.date = date; | ||
return this; | ||
} | ||
|
||
public String getLastComment() { | ||
return lastComment; | ||
} | ||
|
||
public ProcessVariables setLastComment(String lastComment) { | ||
this.lastComment = lastComment; | ||
return this; | ||
} | ||
|
||
public List<Map<String, String>> getComments() { | ||
return comments; | ||
} | ||
|
||
public ProcessVariables setComments(List<Map<String, String>> comments) { | ||
this.comments = comments; | ||
return this; | ||
} | ||
|
||
public Map<String, Object> getAttachment() { | ||
return attachment; | ||
} | ||
|
||
public ProcessVariables setAttachment(Map<String, Object> attachment) { | ||
this.attachment = attachment; | ||
return this; | ||
} | ||
|
||
public String getActionResult() { | ||
return actionResult; | ||
} | ||
|
||
public ProcessVariables setActionResult(String actionResult) { | ||
this.actionResult = actionResult; | ||
return this; | ||
} | ||
|
||
public Boolean getResolved() { | ||
return resolved; | ||
} | ||
|
||
public ProcessVariables setResolved(Boolean resolved) { | ||
this.resolved = resolved; | ||
return this; | ||
} | ||
|
||
public String getLastAdhocTaskType() { | ||
return lastAdhocTaskType; | ||
} | ||
|
||
public ProcessVariables setLastAdhocTaskType(String lastAdhocTaskType) { | ||
this.lastAdhocTaskType = lastAdhocTaskType; | ||
return this; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString( | ||
this, | ||
new MultilineRecursiveToStringStyle() { | ||
public ToStringStyle withShortPrefixes() { | ||
this.setUseShortClassName(true); | ||
this.setUseIdentityHashCode(false); | ||
return this; | ||
} | ||
}.withShortPrefixes()); | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.