mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Update the actions type from RuleDefinition class in order to be able to use it with other non-rm actions
This commit is contained in:
@@ -45,7 +45,7 @@ public class RuleDefinition
|
||||
private String contentTitle;
|
||||
private String contentDescription;
|
||||
private String rejectReason;
|
||||
private List<ActionsOnRule> actions;
|
||||
private List<String> actions;
|
||||
|
||||
/**
|
||||
* Creates a new object of type Rule Definition
|
||||
@@ -189,15 +189,15 @@ public class RuleDefinition
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public List<ActionsOnRule> getActions()
|
||||
public List<String> getActions()
|
||||
{
|
||||
return actions;
|
||||
}
|
||||
|
||||
public RuleDefinition actions(List<ActionsOnRule> actions)
|
||||
public RuleDefinition actions(List<String> actions)
|
||||
{
|
||||
this.actions = actions;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,6 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.alfresco.rest.core.v0.BaseAPI;
|
||||
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
|
||||
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.json.JSONArray;
|
||||
@@ -251,10 +250,10 @@ public class RulesAPI extends BaseAPI
|
||||
{
|
||||
List<JSONObject> ruleActionsList = new ArrayList<>();
|
||||
|
||||
for (ActionsOnRule ruleAction : ruleProperties.getActions())
|
||||
for (String ruleAction : ruleProperties.getActions())
|
||||
{
|
||||
JSONObject ruleActionObj = new JSONObject();
|
||||
ruleActionObj.put("actionDefinitionName", ruleAction.getActionValue());
|
||||
ruleActionObj.put("actionDefinitionName", ruleAction);
|
||||
JSONObject parameters = new JSONObject();
|
||||
if (ruleProperties.getPath() != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user