Flowable 6.6.0 BPMN 사용자 가이드 - 9 폼 - 9.2 폼 속성

《 Flowable 6.6.0 BPMN 사용자 매 뉴 얼 》
1. 입문
2. 설정
3 The Flowable API
4 Flowable 6.6.0 BPMN 사용자 가이드 - (4) Spring 집성
5 Spring Boot
6 배치
7 BPMN 2.0 안내
8 BPMN 2.0 의 구조
9 양식 (양식)
9.1 폼 정의 9.2 폼 속성 9.3 외부 폼 렌 더 링 (External form rendering)
Flowable 에 관 한 더 많은 문서, 참조:
《 Flowable 문서 대전 》
9.2 폼 속성
All information relevant to a business process is either included in the process variables themselves or referenced through the process variables. Flowable supports complex Java objects to be stored as process variables like Serializable objects, JPA entities or whole XML documents as Strings.
모든 업무 절차 와 관련 된 정 보 는 절차 변수 에 포함 되 거나 절차 변 수 를 통 해 참조 된다.Flowable 은 Serializable 대상, JPA 실체 또는 문자열 의 전체 XML 문서 와 같은 복잡 한 자바 대상 을 프로 세 스 변수 로 저장 하 는 것 을 지원 합 니 다.
Starting a process and completing user tasks is where people are involved into a process. Communicating with people requires forms to be rendered in some UI technology. In order to facilitate multiple UI technologies easy, the process definition can include the logic of transforming of the complex Java typed objects in the process variables to a Map of ‘properties’.
하나의 절 차 를 시작 하고 사용자 임 무 를 완성 하 는 것 은 사람들 이 절차 에 참여 하 는 곳 이다.사람과 의 통신 은 일부 UI 기술 로 폼 을 보 여 줘 야 한다.다양한 UI 기술 을 간소화 하기 위해 프로 세 스 정 의 는 프로 세 스 변수 에서 복잡 한 자바 타 입 대상 을 'properties' 로 전환 하 는 Map 의 논 리 를 포함 할 수 있 습 니 다.
Any UI technology can then build a form on top of those properties, using the Flowable API methods that expose the property information. The properties can provide a dedicated (and more limited) view on the process variables. The properties needed to display a form are available in the FormData return values of for example
그 다음 에 UI 기술 은 이러한 속성 을 바탕 으로 폼 을 구축 하고 Flowable API 방법 으로 관련 속성 정 보 를 얻 을 수 있 습 니 다.속성 은 프로 세 스 변수 에 대한 전용 (더 제 한 된) 보 기 를 제공 할 수 있 습 니 다.폼 에 필요 한 속성 을 보 여 줍 니 다. 예 를 들 어 FormData 반환 값 에서 얻 을 수 있 습 니 다.
StartFormData FormService.getStartFormData(String processDefinitionId)

혹시
TaskFormdata FormService.getTaskFormData(String taskId)

By default, the built-in form engine ‘sees’ the properties as well as the process variables. So there is no need to declare task form properties if they match 1-1 with the process variables. For example, with the following declaration:
기본 적 인 상황 에서 내 장 된 폼 엔진 은 이러한 속성 과 절차 변 수 를 볼 수 있 습 니 다.따라서 작업 폼 속성 이 프로 세 스 변수 1 - 1 과 일치 하면 설명 할 필요 가 없습니다.예 를 들 어 다음 과 같은 성명 을 사용 합 니 다.
<startEvent id="start" />

All process variables are available when execution arrives in the startEvent, but formService.getStartFormData(String processDefinitionId).getFormProperties() will be empty since no specific mapping was defined.
startEvent 에 도 착 했 을 때 모든 프로 세 스 변 수 는 사용 할 수 있 지만 formService. getStartFormData (String processDefinitionId). getFormProperties () 는 지정 한 맵 이 정의 되 지 않 았 기 때문에 비어 있 습 니 다.
In the above case, all the submitted properties will be stored as process variables. This means that by simply adding a new input field in the form, a new variable can be stored.
Properties are derived from process variables, but they don’t have to be stored as process variables. For example, a process variable could be a JPA entity of class Address. And a form property StreetName used by the UI technology could be linked with an expression #{address.street}
상례 에서 제출 한 모든 속성 은 프로 세 스 변수 로 저 장 됩 니 다.이것 은 폼 에 새로운 입력 필드 를 추가 하면 새로운 변 수 를 저장 한 다 는 것 을 의미한다.
속성 은 프로 세 스 변수 에서 파생 되 지만 프로 세 스 변수 로 저장 할 필요 가 없습니다.예 를 들 어 프로 세 스 변 수 는 Address 류 의 JPA 실체 일 수 있 습 니 다.UI 기술 에 사용 되 는 폼 속성 StreetName 은 표현 식 \ # {address. street} 과 연결 할 수 있 습 니 다.
Analogue, the properties that a user is supposed to submit in a form can be stored as a process variable or as a nested property in one of the process variables with a UEL value expression like e.g. #{address.street} . Analogue the default behavior of properties that are submitted is that they will be stored as process variables unless a formProperty declaration specifies otherwise.
Also type conversions can be applied as part of the processing between form properties and process variables. For example:
유사 하 게 사용자 가 폼 에 제출 한 속성 은 프로 세 스 변수 로 저장 할 수도 있 고 UEL 값 표현 식 을 가 진 프로 세 스 변수 에 포 함 된 속성 으로 저장 할 수도 있 습 니 다. 예 를 들 어 \ # {address. street}.
이와 유사 하 게 제출 한 속성의 기본 행 위 는 formProperty 성명 에 따로 규정 되 어 있 지 않 으 면 프로 세 스 변수 로 저 장 됩 니 다.폼 속성 과 프로 세 스 변수 간 의 처 리 를 할 때 도 형식 변환 을 적용 할 수 있 습 니 다.예 를 들 면:
<userTask id="task">
  <extensionElements>
    <flowable:formProperty id="room" />
    <flowable:formProperty id="duration" type="long"/>
    <flowable:formProperty id="speaker" variable="SpeakerName" writable="false" />
    <flowable:formProperty id="street" expression="#{address.street}" required="true" />
  </extensionElements>
</userTask>
  • Form property room will be mapped to process variable room as a String
  • Form property duration will be mapped to process variable duration as a java.lang.Long
  • Form property speaker will be mapped to process variable SpeakerName. It will only be available in the TaskFormData object. If property speaker is submitted, an FlowableException will be thrown. Analogue, with attribute readable=“false”, a property can be excluded from the FormData, but still be processed in the submit.
  • Form property street will be mapped to Java bean property street in process variable address as a String. And required=“true” will throw an exception during the submit if the property is not provided.
  • 폼 속성 room 은 프로 세 스 변수 room
  • 에 문자열 로 매 핑 됩 니 다.
  • 폼 속성 duration 은 자바. lang. Long 형식의 프로 세 스 변수 duration 에 매 핑 됩 니 다.
  • 폼 속성 speaker 는 프로 세 스 변수 SpeakerName 에 매 핑 됩 니 다.이것 은 TaskformData 대상 에서 만 사용 할 수 있 습 니 다.속성 speaker 를 제출 하면 FlowableException 이 발생 합 니 다.이와 유사 하 게 속성 readable = "false" 일 때 FormData 에서 속성 을 제거 할 수 있 지만 제출 에서 처리 할 수 있 습 니 다.
  • 폼 속성 street 는 프로 세 스 변수 address 의 자바 bean 속성 street 에 문자열 로 매 핑 됩 니 다.이 속성 을 제공 하지 않 고 required = "true" 때문에 제출 할 때 이상 이 발생 합 니 다.

  • It’s also possible to provide type metadata as part of the FormData that is returned from methods StartFormData FormService.getStartFormData(String processDefinitionId) and TaskFormdata FormService.getTaskFormData(String taskId)
    We support the following form property types:
  • string (org.flowable.engine.impl.form.StringFormType
  • long (org.flowable.engine.impl.form.LongFormType)
  • double (org.flowable.engine.impl.form.DoubleFormType)
  • enum (org.flowable.engine.impl.form.EnumFormType)
  • date (org.flowable.engine.impl.form.DateFormType)
  • boolean (org.flowable.engine.impl.form.BooleanFormType)

  • FormData 의 일부분 으로 형식 메타 데 이 터 를 제공 할 수 있 습 니 다. StartFormData FormService. getStartFormData (String processDefinitionId) 와 TaskFormdata FormService. getTaskFormData (String taskId) 에서 FormData 로 돌아 갑 니 다.
    저 희 는 다음 폼 속성 유형 을 지원 합 니 다:
  • string (org.flowable.engine.impl.form.StringFormType
  • long (org.flowable.engine.impl.form.LongFormType)
  • double (org.flowable.engine.impl.form.DoubleFormType)
  • enum (org.flowable.engine.impl.form.EnumFormType)
  • date (org.flowable.engine.impl.form.DateFormType)
  • boolean (org.flowable.engine.impl.form.BooleanFormType)

  • For each form property declared, the following FormProperty information will be made available through List formService.getStartFormData(String processDefinitionId).getFormProperties() and List formService.getTaskFormData(String taskId).getFormProperties()
    성명 의 모든 폼 속성 에 대해 서 는 List formService. getStartFormData (String processDefinitionId). getFormProperties () 와 List formService. getTaskFormData (String taskId). getFormProperties () 를 통 해 다음 FormProperties 정 보 를 얻 을 수 있 습 니 다.
    
    public interface FormProperty {
         
      /** the key used to submit the property in {
         @link FormService#submitStartFormData(String, java.util.Map)}
       * or {
         @link FormService#submitTaskFormData(String, java.util.Map)} */
      String getId();
      /** the display label */
      String getName();
      /** one of the types defined in this interface like e.g. {
         @link #TYPE_STRING} */
      FormType getType();
      /** optional value that should be used to display in this property */
      String getValue();
      /** is this property read to be displayed in the form and made accessible with the methods
       * {
         @link FormService#getStartFormData(String)} and {@link FormService#getTaskFormData(String)}. */
      boolean isReadable();
      /** is this property expected when a user submits the form? */
      boolean isWritable();
      /** is this property a required input field */
      boolean isRequired();
    }
    

    For example:
    <startEvent id="start">
      <extensionElements>
        <flowable:formProperty id="speaker"
          name="Speaker"
          variable="SpeakerName"
          type="string" />
    
        <flowable:formProperty id="start"
          type="date"
          datePattern="dd-MMM-yyyy" />
    
        <flowable:formProperty id="direction" type="enum">
          <flowable:value id="left" name="Go Left" />
          <flowable:value id="right" name="Go Right" />
          <flowable:value id="up" name="Go Up" />
          <flowable:value id="down" name="Go Down" />
        </flowable:formProperty>
    
      </extensionElements>
    </startEvent>
    

    All that information is accessible through the API. The type names can be obtained with formProperty.getType().getName(). And even the date pattern is available with formProperty.getType().getInformation(“datePattern”) and the enumeration values are accessible with formProperty.getType().getInformation(“values”)
    The following XML snippet
    이 모든 정 보 는 API 를 통 해 접근 할 수 있 습 니 다. 형식 이름 은 formProperty. getType (). getName () 을 통 해 얻 을 수 있 습 니 다. 날짜 모드 도 formProperty. getType (). getInformation ("datePattern") 를 통 해 얻 을 수 있 습 니 다. 매개 값 은 ormProperty. getType (). getInformation ("values") 를 통 해 얻 을 수 있 습 니 다.
    다음 XML 세 션
    <startEvent>
      <extensionElements>
        <flowable:formProperty id="numberOfDays" name="Number of days" value="${numberOfDays}" type="long" required="true"/>
        <flowable:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" value="${startDate}" datePattern="dd-MM-yyyy hh:mm" type="date" required="true" />
        <flowable:formProperty id="vacationMotivation" name="Motivation" value="${vacationMotivation}" type="string" />
      </extensionElements>
    </userTask>
    

    could be used to render to a process start form in a custom app.
    사용자 정의 프로그램 에서 프로 세 스 시작 창 을 렌 더 링 할 수 있 습 니 다.

    좋은 웹페이지 즐겨찾기