Skip to content

Commit

Permalink
Updated kie-editors-standalone dependency, bumped version to 2.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oas committed Sep 30, 2021
1 parent 8c17171 commit 6cacf50
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ public Response getModels(@PathParam("workspace") String workspaceUUID) throws I
@Path("/model")
@Consumes("application/json")
public Response importModels(@PathParam("workspace") String workspaceUUID, String body) throws Exception {
List<Map<String, String>> models = SerializationHelper.getInstance().toClass(body, new TypeReference<LinkedList<Map<String, String>>>() {
});

Workspace workspace = WorkspaceManager.getInstance().get(workspaceUUID);

SynchronizationHelper.getWorkspaceLock(workspaceUUID).writeLock().lock();

try {
List<Map<String, String>> models = SerializationHelper.getInstance().toClass(body, new TypeReference<LinkedList<Map<String, String>>>() {
});

Workspace workspace = WorkspaceManager.getInstance().get(workspaceUUID);

// Remove all old models and clear the decision session.
workspace.getModelManager().removeAllFiles();
workspace.clearDecisionSession();
Expand Down Expand Up @@ -106,8 +107,6 @@ public Response importModels(@PathParam("workspace") String workspaceUUID, Strin
configuration.setModifiedDate(System.currentTimeMillis());
configuration.serialize();

SynchronizationHelper.getWorkspaceLock(workspaceUUID).writeLock().unlock();

workspace.getAccessLog().writeMessage("Imported models", configuration.getModifiedDate());

// Notify all sessions.
Expand Down

0 comments on commit 6cacf50

Please sign in to comment.