20.5 Specifying a Return Value from a Bounded Task Flow
You
can configure a bounded task flow to return a parameter value to the
task flow that calls it. The value that the bounded task flow returns
is in addition to the outcome that it returns to the caller when the
bounded task flow invokes a task flow return activity, as described
in Section
19.7, "Using Task Flow Return Activities." To
return a value, you must specify:
- Return value definitions on the called bounded task flow
The
return value definition specifies where you store the value that you
want to return when the called bounded task flow exits.
- Return values on the task flow call activity in the calling task flow to identify where the calling task flow can find the returned value
You
can configure the calling task flow to ignore return value definition
from the called task flow by not identifying any return values on the
task flow call activity in the calling task flow.
The
task flow call activity returns values by reference. For this reason,
you do not need to make a copy of the values that you want to return
to the calling task flow.
20.5.1 How to Specify a Return Value from a Bounded Task Flow
You
specify a return value definition on the called task flow and add a
parameter to the task flow call activity in the calling task flow
that retrieves the return value at runtime.
Create
a bounded or unbounded task flow (calling task flow) and a bounded
task flow (called task flow). For more information, see Section
18.2, "Creating a Task Flow."
It
may be helpful to have an understanding of the interaction between
the calling task flow and the called task flow. For more information,
see Section
20.5, "Specifying a Return Value from a Bounded Task Flow."
You
may also find it helpful to understand functionality that can be
added using other task flow features and parameters. For more
information, see Section
20.1.2, "Additional Functionality for Task Flows Using
Parameters."
- In the Application Navigator, double-click the source file for the called task flow.
- In the overview editor, click the Parameters navigation tab.
- Click the Add icon next to the Return Value Definitions category and add values as follows to define a return value:
- Name: Enter a name to identify the return value. For example,
returnValue1
. - Class: Enter a Java class that defines the data type of the return value. The default value is
java.lang.String
. - Value: Enter an EL expression that specifies where to store the return value when the called task flow exits. For example, enter an EL expression similar to the following:
#{pageFlowScope.ReturnValueDefinition}
- In the Application Navigator, double-click the source file for the calling task flow.
- In the ADF Task Flow page of the Component Palette, from the Component panel, drag and drop a task call activity onto the diagram.
- In the Property Inspector for the task flow activity, expand the Parameters section, click the Add icon next to the Return Values entry and add values as follows to define a return value:
- Name: Enter a name to identify the return value. For example,
returnValue1
.
The
value you enter must match the value you entered for the Name field
when you defined the return value definition in step 3.
- Value: Enter an EL expression that specifies where to store the return value when the called task flow exits. For example, enter an EL expression similar to the following:
#{pageFlowScope.ReturnValueDefinition}
The
value you enter must match the value you entered for the Value field
when you defined the return value definition in step 3.
20.5.2 What Happens When You Specify a Return Value from a Bounded Task Flow
At
design time, JDeveloper writes entries to the source files for the
task flows that you configured. Example
20-7 shows
an example entry that JDeveloper writes to the source file for the
calling task flow.
<task-flow-call id="taskFlowCall1"> <return-value id="__3"> <name id="__4">returnValue1</name> <value id="__2">#{pageFlowScope.ReturnValueDefinition}</value> </return-value> </task-flow-call>
Example
20-8 shows
an example entry that JDeveloper writes to the source file for the
called task flow.
<return-value-definition id="__2"> <name id="__3">returnValue1</name> <value>#{pageFlowScope.ReturnValueDefinition}/</value> <class>java.lang.String</class> </return-value-definition>
At
runtime, the called task flow returns a value. If configured to do
so, the task flow call activity in the calling task flow retrieves
this value.
바인드 작업 흐름에서 반환 지정
당신은 그것을 호출 작업 흐름에
매개 변수 값을 반환하는 바인드 작업 흐름을 설정할
수 있습니다. 바인드
작업 플로우 반환은 그것이 설명한대로 바인드 작업
흐름 태스크 플로우 반환 활동을 호출 호출자에게
반환하는 결과에 추가 된 값 19.7
항 "작업
플로우 리턴 활동의 사용은"값을
반환하려면 다음과 같이 지정해야합니다.
라는 바인드 작업 흐름에서 반환
정의
당신은 때 호출되는 바인드 작업
흐름의 종료를 반환하려는 값을 저장하는 위치 반환
값의 정의를 지정합니다.
호출 타스크 플로우는 반환 값을
찾을 수있는 장소를 식별하기 위해 호출 타스크 플로우의
작업 흐름 콜 활동에 값을 반환
당신은 호출자의 작업 흐름 작업
흐름 콜 활동에 어떤 반환 값을 특정하지 않음으로써
호출되는 작업 흐름의 반환 값의 정의를 무시하도록
호출 태스크 흐름을 설정할 수 있습니다.
작업 플로우 통화 내역을보고
값을 반환합니다. 이런
이유로 당신은 호출자의 작업 흐름에 돌아가고 싶은
값의 복사본을 만들 필요가 없습니다.
20.5.1
바인드 작업 흐름에서 반환 값을 지정하는 방법
당신이 부르는 작업 흐름에서
반환 값의 정의를 지정하고 실행하면 반환 값을 검색하고
호출 작업 흐름 작업 흐름 콜 활동에 매개 변수를
추가합니다.
시작하기 전에 :
(작업
흐름을 호출) 경계
또는 바인딩없이 작업 흐름을 만들고 바인드 작업 흐름
(라는 작업 흐름).
자세한 내용은 18.2 절
"작업 흐름의
생성을."
이것은 호출 타스크 플로우라는
작업 흐름 사이의 상호 작용의 이해를 가지고 있으면
편리 할지도 모릅니다.
자세한 내용은 20.5 절
"바인드 작업
흐름에서 반환 지정을"
또한 그것은 도움 다른 작업
흐름의 기능 및 매개 변수를 사용하여 추가 할 수 기능을
이해할 수 있습니다. 자세한
내용은 제 20.1.2 항을
"작업을위한 추가
기능은 매개 변수의 사용이 흐르고 있습니다."
라는 바인드 작업 흐름에서 반환
값을 지정하려면 :
애플리케이션 네비게이터에서라는
작업 흐름의 소스 파일을 더블 클릭합니다.
개요 편집기에서 매개 변수 탐색
탭을.
클릭 추가 옆의 아이콘 반환
정의 카테고리를 반환 값을 정의하려면 다음과 같이
값을 추가합니다.
이름 :
반환 값을 식별하는 이름을 입력합니다.
예를 들어,
returnValue1.
클래스 :
반환 값의 데이터 형식을 정의하는 Java
클래스를 입력한다.
기본값은 java.lang.String의.
값 :
반환 값라는 작업 흐름의 종료를 저장할 위치를
지정하는 EL 식을
입력합니다. 예를
들어, 다음과 같은
EL 표현식을 입력합니다.
#
{pageFlowScope.ReturnValueDefinition}
애플리케이션 네비게이터에서
호출 타스크 플로우의 소스 파일을 더블 클릭합니다.
컴포넌트 팔레트의 ADF
작업 흐름 페이지에서 구성 요소 패널에서 드래그
앤 다이어그램 작업 콜 활동을 놓습니다.
작업 플로우 활동에 대한 속성
관리자에서 배포하는 매개 변수 섹션을 클릭 한 다음
추가 옆의 아이콘을 반환 항목과 반환 값을 정의하려면
다음과 같이 값을 추가 합니다.
이름 :
반환 값을 식별하는 이름을 입력합니다.
예를 들어,
returnValue1.
당신이 입력 한 값은 당신이
입력 한 값과 일치해야합니다 이름은 단계에서 반환
정의를 정의 할 때 필드 3.
값 :
반환 값라는 작업 흐름의 종료를 저장할 위치를
지정하는 EL 식을
입력합니다. 예를
들어, 다음과 같은
EL 표현식을 입력합니다.
#
{pageFlowScope.ReturnValueDefinition}
당신이 입력 한 값은 당신이
입력 한 값과 일치해야합니다 값과 같이 반환 정의를
정의 할 때 필드 3.
20.5.2
당신이 바인드 작업 흐름의 반환 값을 지정할 때
발생하는
작업이 설정되어 있는지 흐름의
설계시에는 JDeveloper는
소스 파일에 항목을 기록합니다.
예 20-7은
JDeveloper는 호출 타스크
플로우의 소스 파일에 쓰기 항목 예를 보여주고있다.
반환 값을 지정하기 위해 호출
작업 흐름에서 예 20-7 메타
데이터
<작업
흐름 콜 ID = "taskFlowCall1">
<반환
id = "__ 3">
<이름
ID = "__ 4">
returnValue1 </ name>
<값
id = "__ 2"> #
{pageFlowScope.ReturnValueDefinition} </ value>
</
복귀 값>
</
작업 흐름 콜>
예 20-8은
JDeveloper가 불리는 작업
흐름의 소스 파일에 쓰기 항목 예를 보여주고있다.
반환 값을 지정하기 위해 호출
작업 흐름에서 예 20-8 메타
데이터
<반환
값 정의 ID = "__ 2">
<이름
ID = "__ 3">
returnValue1 </ name>
<값>
# {pageFlowScope.ReturnValueDefinition} / </ value>
<클래스>
java.lang.String의 </
클래스>
</
수익 가치의 정의>
실행시라는 작업 흐름은 값을
반환합니다. 그렇게
설정했을 경우, 호출자의
작업 흐름 작업 흐름 콜 활동이 값을 가져옵니다.
---------------------------------------------------------------
from - https://docs.oracle.com ~~~~ someWhere
N
https://translate.google.com/
Thks oracleNgoogle
---------------------------------------------------------------
from - https://docs.oracle.com ~~~~ someWhere
N
https://translate.google.com/
Thks oracleNgoogle
댓글 없음:
댓글 쓰기