本文整理汇总了Java中org.kuali.rice.kew.api.rule.RuleDelegation类的典型用法代码示例。如果您正苦于以下问题:Java RuleDelegation类的具体用法?Java RuleDelegation怎么用?Java RuleDelegation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RuleDelegation类属于org.kuali.rice.kew.api.rule包,在下文中一共展示了RuleDelegation类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildDelegationGraph
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
private void buildDelegationGraph(ActionRequestFactory arFactory, RouteContext context,
org.kuali.rice.kew.api.rule.Rule delegationRule, DocumentRouteHeaderValue routeHeaderValue, ActionRequestValue parentRequest, RuleDelegation ruleDelegation) {
context.setActionRequest(parentRequest);
RuleBaseValues delRuleBo = KEWServiceLocator.getRuleService().getRuleByName(delegationRule.getName());
if (delegationRule.isActive()) {
for (org.kuali.rice.kew.api.rule.RuleResponsibility delegationResp : delegationRule.getRuleResponsibilities())
{
if (delegationResp.isUsingRole())
{
makeRoleActionRequests(arFactory, context, delegationRule, delegationResp, routeHeaderValue, parentRequest, ruleDelegation);
} else if (delRuleBo.isMatch(context.getDocumentContent()))
{
makeActionRequest(arFactory, context, delegationRule, routeHeaderValue, delegationResp, parentRequest, ruleDelegation);
}
}
}
}
示例2: getRuleDelegationsByResponsibiltityId
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public List<RuleDelegation> getRuleDelegationsByResponsibiltityId(
@WebParam(name = "id") String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
incomingParamCheck("id", id);
QueryByCriteria.Builder builder = QueryByCriteria.Builder.create();
builder.setPredicates(
equal("responsibilityId", id),
equal("delegationRule.currentInd", Boolean.TRUE)
);
QueryResults<RuleDelegationBo> results = dataObjectService.findMatching(RuleDelegationBo.class, builder.build());
List<RuleDelegation> ruleDelegations = new ArrayList<RuleDelegation>();
for (RuleDelegationBo bo : results.getResults()) {
ruleDelegations.add(RuleDelegationBo.to(bo));
}
return ruleDelegations;
}
示例3: getRuleDelegationsByResponsibiltityId
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public List<RuleDelegation> getRuleDelegationsByResponsibiltityId(
@WebParam(name = "id") String id) throws RiceIllegalArgumentException, RiceIllegalStateException {
incomingParamCheck("id", id);
Map<String, Object> criteria = new HashMap<String, Object>(2);
criteria.put("responsibilityId", id);
criteria.put("delegationRule.currentInd", Boolean.TRUE);
Collection<RuleDelegationBo> delegations = this.businessObjectService.findMatching(RuleDelegationBo.class,
criteria);
List<RuleDelegation> ruleDelegations = new ArrayList<RuleDelegation>();
if (CollectionUtils.isNotEmpty(delegations)) {
for (RuleDelegationBo bo : delegations) {
ruleDelegations.add(RuleDelegationBo.to(bo));
}
}
return ruleDelegations;
}
示例4: create
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
* Construct a RuleValidationContext under which to validate a rule. The rule must be non-null, the delegation
* and author can be <code>null</code> given the circumstances defined in the description of this class.
*/
public static Builder create(RuleContract rule, RuleDelegationContract ruleDelegation, String ruleAuthorPrincipalId) {
Builder builder = Builder.create(rule);
if (ruleDelegation != null) {
builder.setRuleDelegation(RuleDelegation.Builder.create(ruleDelegation));
}
builder.setRuleAuthorPrincipalId(ruleAuthorPrincipalId);
return builder;
}
示例5: getRuleDelegation
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
* Retrieve the RuleDelegation representing the parent of the rule being validated. If the rule is
* not a delegation rule, then this will return null;
*/
@Override
public RuleDelegation getRuleDelegation() {
return ruleDelegation;
}
示例6: setRuleDelegation
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
public void setRuleDelegation(RuleDelegation.Builder ruleDelegation) {
this.ruleDelegation = ruleDelegation;
}
示例7: makeActionRequests
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
private void makeActionRequests(ActionRequestFactory arFactory, RouteContext context, org.kuali.rice.kew.api.rule.Rule rule, DocumentRouteHeaderValue routeHeader, ActionRequestValue parentRequest, RuleDelegation ruleDelegation)
throws WorkflowException {
List<org.kuali.rice.kew.api.rule.RuleResponsibility> responsibilities = rule.getRuleResponsibilities();
makeActionRequests(arFactory, responsibilities, context, rule, routeHeader, parentRequest, ruleDelegation);
}
示例8: makeRoleActionRequests
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
* Generates action requests for a role responsibility
*/
private void makeRoleActionRequests(ActionRequestFactory arFactory, RouteContext context,
org.kuali.rice.kew.api.rule.Rule rule, org.kuali.rice.kew.api.rule.RuleResponsibility resp, DocumentRouteHeaderValue routeHeader, ActionRequestValue parentRequest,
RuleDelegation ruleDelegation)
{
String roleName = resp.getResolvedRoleName();
//RoleAttribute roleAttribute = resp.resolveRoleAttribute();
RoleAttribute roleAttribute = null;
if (resp.isUsingRole()) {
//get correct extension definition
roleAttribute = (RoleAttribute) GlobalResourceLoader.getResourceLoader().getObject(new ObjectDefinition(
resp.getRoleAttributeName()));
if (roleAttribute instanceof XmlConfiguredAttribute) {
ExtensionDefinition roleAttributeDefinition = null;
for (RuleTemplateAttribute ruleTemplateAttribute : rule.getRuleTemplate().getRuleTemplateAttributes()) {
if (resp.getRoleAttributeName().equals(ruleTemplateAttribute.getRuleAttribute().getResourceDescriptor())) {
roleAttributeDefinition = ruleTemplateAttribute.getRuleAttribute();
break;
}
}
((XmlConfiguredAttribute)roleAttribute).setExtensionDefinition(roleAttributeDefinition);
}
}
//setRuleAttribute(roleAttribute, rule, resp.getRoleAttributeName());
List<String> qualifiedRoleNames = new ArrayList<String>();
if (parentRequest != null && parentRequest.getQualifiedRoleName() != null) {
qualifiedRoleNames.add(parentRequest.getQualifiedRoleName());
} else {
qualifiedRoleNames.addAll(roleAttribute.getQualifiedRoleNames(roleName, context.getDocumentContent()));
}
for (String qualifiedRoleName : qualifiedRoleNames) {
if (parentRequest == null && isDuplicateActionRequestDetected(routeHeader, context.getNodeInstance(), resp, qualifiedRoleName)) {
continue;
}
ResolvedQualifiedRole resolvedRole = roleAttribute.resolveQualifiedRole(context, roleName, qualifiedRoleName);
RoleRecipient recipient = new RoleRecipient(roleName, qualifiedRoleName, resolvedRole);
if (parentRequest == null) {
ActionRequestValue roleRequest = arFactory.addRoleRequest(recipient, resp.getActionRequestedCd(),
resp.getApprovePolicy(), resp.getPriority(), resp.getResponsibilityId(), rule.isForceAction(),
rule.getDescription(), rule.getId());
List<RuleDelegation> ruleDelegations = getRuleService().getRuleDelegationsByResponsibiltityId(resp.getResponsibilityId());
if (ruleDelegations != null && !ruleDelegations.isEmpty()) {
// create delegations for all the children
for (ActionRequestValue request : roleRequest.getChildrenRequests()) {
for (RuleDelegation childRuleDelegation : ruleDelegations) {
buildDelegationGraph(arFactory, context, childRuleDelegation.getDelegationRule(), routeHeader, request, childRuleDelegation);
}
}
}
} else {
arFactory.addDelegationRoleRequest(parentRequest, resp.getApprovePolicy(), recipient, resp.getResponsibilityId(), rule.isForceAction(), ruleDelegation.getDelegationType(), rule.getDescription(), rule.getId());
}
}
}
示例9: saveRuleDefaults
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@CacheEvict(value={RuleTemplate.Cache.NAME, Rule.Cache.NAME, RuleDelegation.Cache.NAME}, allEntries = true)
public void saveRuleDefaults(RuleDelegationBo ruleDelegation, RuleBaseValues ruleBaseValues);
示例10: makeCurrent
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
@Override
public void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) {
clearCache(RuleDelegation.Cache.NAME);
makeCurrent(ruleDelegation, ruleDelegation.getDelegationRule(), isRetroactiveUpdatePermitted);
}
示例11: makeCurrent
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
public void makeCurrent(RuleDelegationBo ruleDelegation, boolean isRetroactiveUpdatePermitted) {
clearCache(RuleDelegation.Cache.NAME);
makeCurrent(ruleDelegation, ruleDelegation.getDelegationRule(), isRetroactiveUpdatePermitted);
}
示例12: findByResponsibilityId
import org.kuali.rice.kew.api.rule.RuleDelegation; //导入依赖的package包/类
/**
* Returns a List of all RuleDelegations with "current" Rules for the given
* responsibility id.
* KULRICE-12368:Added the caching annotation to this method so it would use not refetch
* the same information repeatedly
*/
@Cacheable(value= RuleDelegation.Cache.NAME, key="'responsibilityId=' + #p0")
public List<RuleDelegationBo> findByResponsibilityId(String responsibilityId);