이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 43. Variable tags


Variables store data that is used during runtime. For greater control over variable behavior, you can tag case variables and local variables in the BPMN case file. Tags are simple string values that you add as metadata to a specific variable.

Red Hat Process Automation Manager supports the following tags for case and local variables:

  • required: Sets the variable as a requirement in order to start a case. If a case starts without the required variable, Red Hat Process Automation Manager generates a VariableViolationException error.
  • readonly: Indicates that the variable is for informational purposes only and can be set only once during case execution. If the value of a read-only variable is modified at any time, Red Hat Process Automation Manager generates a VariableViolationException error.
  • restricted: A tag that is used with the VariableGuardProcessEventListener to indicate that permission is granted to modify the variable based on the existing role. The restricted tag can be replaced by any other tag name if using the second constructor that passes the new tag name.

The VariableGuardProcessEventListener class is extended from the DefaultProcessEventListener class and supports two different constructors:

  • VariableGuardProcessEventListener

    public VariableGuardProcessEventListener(String requiredRole, IdentityProvider identityProvider) {
        this("restricted", requiredRole, identityProvider);
    }
    Copy to Clipboard Toggle word wrap
  • VariableGuardProcessEventListener

    public VariableGuardProcessEventListener(String tag, String requiredRole, IdentityProvider identityProvider) {
        this.tag = tag;
        this.requiredRole = requiredRole;
        this.identityProvider = identityProvider;
    }
    Copy to Clipboard Toggle word wrap

    Therefore, you must add an event listener to the session with the allowed role name and identity provider that returns the user role as shown in the following example:

    ksession.addEventListener(new VariableGuardProcessEventListener("AdminRole", myIdentityProvider));
    Copy to Clipboard Toggle word wrap

    In the previous example, the VariableGuardProcessEventListener method verifies if a variable is tagged with a security constraint tag (restricted). If the user does not have the required role (for example, AdminRole), then Red Hat Process Automation Manager generates a VariableViolationException error. NOTE: The variable tags that appear in the Business Central UI, for example internal, input, output, business-relevant, and tracked are not supported in Red Hat Process Automation Manager.

You can add the tag directly to the BPMN process source file as a customTags metadata property with the tag value defined in the format ![CDATA[TAG_NAME]].

For example, the following BPMN process applies the required tag to an approved process variable:

Figure 43.1. Example variable tagged in the BPMN modeler

Example variable tagged in a BPMN file

<bpmn2:property id="approved" itemSubjectRef="ItemDefinition_9" name="approved">
  <bpmn2:extensionElements>
    <tns:metaData name="customTags">
      <tns:metaValue><![CDATA[required]]></tns:metaValue>
    </tns:metaData>
  </bpmn2:extensionElements>
</bpmn2:property>
Copy to Clipboard Toggle word wrap

You can use more than one tag for a variable where applicable. You can also define custom variable tags in your BPMN files to make variable data available to Red Hat Process Automation Manager process event listeners. Custom tags do not influence the Red Hat Process Automation Manager runtime as the standard variable tags do and are for informational purposes only. You define custom variable tags in the same customTags metadata property format that you use for standard Red Hat Process Automation Manager variable tags.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat