반응형
Adding Process Analytics Specification to BPMN Process

In this lab, you add process analytics information to the Sales Quote process.

For the purposes of this lab, you analyze discounts offered to understand its distribution across deal sizes (total net revenue) and industries. At the end of this lab, you will have created the following dashboard:





Adding Business Indicators

Process Analytics capture standard data such as workload and cycle time and process specific data. Business Indicators are used to specify what process specific data should be captured.

There are 3 types of Business Indicators supported:

  • Measures – These are numerical data that typically signify a value that is interesting in process analytics. In this scenario, you create a measure for discount.
  • Dimensions – These specify how process analytic data may be sliced. A dimension has to have a finite set of values. In cases where it is not, such as for numbers and date/time, a set of ranges must be specified for the data. In this scenario, you create dimensions for industry and revenue, where revenue is a numerical dimension, and needs ranges to be specified.
  • Counters – As the name indicates, these are useful for counting iterations. In this scenario, you add a counter to count the number of times the quote needs to be revised. The number of iterations is clearly an interesting data point for analytics and can be used for creating dashboards as a challenge exercise.

RequestQuoteLab BPMN 프로젝트 편집 화면의 구조(Structure) 패널이 있습니다. // 없으면 View - Structure (Ctrl + Shift + S)
 
Business Indicators 에서 오른쪽 버튼 클릭 - New - Dimension 클릭.



Name: revenueDimension
Type: Int



추가 버튼을 이용해서 아래와 같이 범위(Range)를 입력합니다.



다시 Dimension 추가.

Name: industry
Type: String



Measure를 추가합니다.



Name: discount
Type: Int



카운트(Counter)를 추가합니다.



Name: numQuoteEdits





Assigning Data to Business Indicators

Now that we have defined our business indicators, we need to assign data to them. Business indicators behave just like other data objects regarding data assignment (association). That is, data can be assigned to them either as part of an activity’s output data association or within a Script activity.

Since, in this scenario, the Enter Quote Details output data association is already used for assigning to quote data object, use a Script activity to assign data to the business indicators from the quote data object.

"Enter Quote Details"와 "Is Business Practices Required?" 사이에 Script 액티브티를 추가합니다.



Name: Assign Indicators



Implementation 탭에서 Use Associations 채크 후 편집합니다.



discount, industry, revenueDimension 을 각각 축합니다.



quote - summary - industry 를 아래와 같이 industry variable에 추가합니다.

두번째 discount 인자 오른쪽의 "Expression Builder" 버튼을 클릭합니다.



round(quote.summary.effectiveDiscount) 입력.



세번째 인자인 revenueDimension 에는 round(quote.summary.totalNetRevenue) 입력.



아래와 같이 3개의 값을 설정 했습니다. OK 클릭.



OK 클릭.





Adding Measurement Mark

By default, process analytic data is specified at the project level and there are 3 settings possible:

  • Generate for interactive activities only
  • Generate for all activities
  • Do not generate

Measurement marks provide a way to add additional capture points. In addition to providing additional capture points, Measurement marks also:

  • Allow specification of a business name which can be used for filtering during analysis
  • Provide a visual notation to indicate the capture point

If it is someone’s preference not to have measurement marks displayed on the canvas, it is possible to specify equivalent capture points by using the Sampling Point property of preceding activity.

Measurement 를 "Assign Indicators"와 "Is Business Practices Required?" 사이에 추가합니다.



더블 클릭하여 수정합니다.



Measurement Type: Single Measurement
Name: QuoteEntered

"discount[Measure]" 를 선택합니다. (Selected 영역에 오게 합니다.)




Adding Counter

Enter Quote Detail 액티브티에서 마우스 오른쪽 버튼 클릭 - Add Counter Mark 클릭.



numQuoteEdits[Counter] 채크.




Running Instances to Create Sample Data

재배치(deploy)합니다.



수정하지 않은 taskflow 프로젝트는 배치하지 않아도 됩니다. (배치가 빨라짐)





Creating Dashboards

As described below, deploy the new version of the process and run a few instances so that during dashboard creation in the next section some data is already available to view.

bpm workspace 에 jcooper 계정으로 로그인합니다.

화면 상단 오른쪽에 문서 추가 버튼을 클릭합니다.



Name: SalesQuoteLab

Add Panel 버튼 클릭.



Panel: Dashboard (Charts) 선택 - OK 버튼 클릭.



Name: Chart

Data Source 오른쪽의 돋보기 아이콘 클릭.



New 버튼 클릭.



아래와 같이 정보를 입력합니다.

OK 버튼 클릭.




Apply 버튼 클릭.



상단 오른쪽의 Apply 버튼 클릭.



아래와 같이 SalesQuoteLab 탭에 차트가 하나 생성되었습니다. 지금은 데이터가 없는지 안나오는군요 -_-


※ 이제부터는 industry, revenue, discount 3개의 필드는 꼭 입력해야 합니다.





반응형
//
반응형
Using the Oracle BPM Workspace

Oracle BPM's Workspace is a web application that allows you to interact with a process in relation to your assigned role or roles within your company. The Workspace helps you to manage your tasks effectively and efficiently with minimal training. It serves as a portal, or window, into a business process for which you have an assigned role. When you select a pending task, the Workspace allows you to execute the transaction or transactions associated with the task. The Workspace allows you to access your work with an Internet browser from any location. You can use the Workspace interface like an e-mail reader to view incoming tasks for which you are responsible.

Workspace allows you to:
   • Invoke instance activity tasks
   • Route completed instances automatically to the user or system responsible for the next step in the process
   • Delegate required tasks to a specific end user
   • Perform operations on a batch of instances
   • Add notes and attachments to an instance of a process
   • Customize how your activities and instances are organized
   • View detailed activity documentation, notes, attachments, and audit trail information
   • Search for instances in processes



A Quick Tour of the BPM Workspace

흐름을 간단하게 설명화면 아래 그림과 같습니다.

 

01234




Triggering the Sales Quote Process

bpm workspace에 접속해서 jcooper 계정으로 로그인 합니다.

왼쪽 상단 Applicatinos 부분에 챕터3에서 배치한 어플이 보입니다. 한번 클릭 합니다.



새창으로 아래와 같은 주문 폼이 뜹니다. 일단은 창을 닫습니다.

※ Script 액티브티에 의해서 자동으로 주문이 생성된 것입니다.





Executing the Interactive Tasks and completing the Process

My Task 탭에서 새로고침 아이콘을 클릭합니다.



방금 전에 창을 닫았던 주문이 목록에 보입니다.

한번만 클립합니다. (더블클릭하게 되면 새 창으로 뜨게 됩니다.)

아래쪽에 코맨트와 첨부를 해봅시다. ㅎㅎ



SUBMIT 버튼 클릭.



SUBMIT 버튼을 클릭하면 jcooper의 작업 목록에서 사라지게 됩니다.

이제 cdickens 계정으로 로그인 합니다.

작업 목록에 보면 jcooper에 의해서 처리된 작업이 Approve Deal 단계로 작업에 올라와 있습니다.

일단 가볍게 승인(Approve 버튼)합니다.



wfaulk 계정으로 로그인 해보면 jcooper에 의해 처리된 작업이 Approve Terms 단계로 올라와 있습니다.

이것도 가볍게 승인!



작업 목록을 새로고침 해보면 Finalize Contracts 단계의 작업이 올라와 있습니다.

OK!



이렇게 하나의 처리가 완료 되었습니다.

주문(Quote) 파일을 저장하기로 했던 곳에 가보면 quote_{seq}.txt 파일이 저장되어 있습니다.



Monitoring the Process Instance using Workspace

다른 BPM 프로젝트의 상태를 확인해 봅시다.

bpm workspace에 jstein 계정으로 접속합니다.

Process Tracking 으로 이동해서 검색창 오른쪽의 "Advanced"를 클릭합니다.


Assigned: Anyone, at any Role in the process

OK 버튼 클릭.



하나의 작업이 진행 중이군요... (jcooper 계정으로 맨 처음 생성만 한 작업입니다.)



가운데에 Audit Trail 왼쪽의 화살표를 클릭해 봅시다.



처리가 어떻게 되가고 있는지 내용이 나옵니다.



Graphical을 선택하면 아래와 같이 그림으로 나옵니다.

현재 Enter QUote Details 에서 멈춰 있군요. ㅎㅎ






반응형
//
반응형
Introduction

In the first exercise, you built a basic process with roles, activities, and transitions. In this lesson, you will further enhance the process by creating data types, variables, Task Services, Rule Services, and Adapter Services and binding them to the process activities.

Objectives

After completing this lesson, you will know how to:
   • Implement Process Activities and create Task, Rule and Adapter Services
   • Define the different kinds of Data Objects (variables)
   • Define Data Inputs and Data Outputs (arguments)
   • Map arguments to instance variables

The tasks you will complete in this lesson are:
   • Understanding of Business Catalog
   • Define Task Services and map to Interactive Tasks
   • Define Rule Services and map to Rule Task
   • Define Adapter Services and map to Service Task.
   • Create Business Objects (data types)
   • Create Data Inputs (input arguments) and Data Outputs (output arguments) for process and process steps
   • Create Variables (Data Objects)
   • Create Data Mappings



Create a Business Object



QuoteProcessLab - Business Catelog 에서 마우스 오른쪽 버튼 클릭 - "New - BusinessObject" 클릭.



Business Object: Quote

Destination Module 오른쪽의 돋보기 아이콘을 클릭합니다.



Module 버튼 클릭.



Module: Data



"Data" 선택.



Based on External Schema 선택 후 오른쪽의 돋보기 클릭.



Import 버튼 클릭 후 URL 오른쪽의 돋보기 버튼 클릭.



Quote.xsd 파일 선택.



"Copy to Project" 체크.



"Maintain original directory structure for imported files" 체크 해제.



QuoteRequest 선택.



OK 버튼 클릭.




Data Inputs and Data Outputs

Data Input refers to the information required to start the Activity (Task, Sub-process) or Process. It is the input argument. A collection of Data Inputs is referred to as an Input Set.

Data Output refers to the data that is returned from the Activity or Process. It is the output argument. A collection of Data Outputs is referred to as an Output Set.

The Start Event has only Output Set. The End Event has only Input Set. Other activities can have both Input and Output Sets.

The Output Set of the Start Event and the Input Set of the End Event determine the arguments of the Process.



Note: As you will see in later section, the input and output arguments of the process step is the same as the inputs and outputs of the Service (Task, Rules, or System) that it is bound to.



Creating Data Objects

아래와 같이 5개의 Process Data Object를 만들어야 합니다.



BPM 프로세스가 열려 있는 상태에서 왼쪽 하단의 구조(Structure) 창에서 작업합니다.

"Process Data Objecs" 에서 마우스 오른쪽 버튼 클릭 - New 클릭.



Name: approveDealOutcome
Type: String



Name: approveTermsOutcome
Type: String



Name: businessPracticesOutcome
Type: String



Name: businessPracticesReviewRequire (d는 짤림 -_-)
Type: Bool



기본형(?)이 아닌 타입의 선택 방법은 아래와 같습니다.

Name: quote
Type: <Component>

오른쪽의 돋보기 클릭.



Quote 선택



OK 클릭.




Implementing Enter Quote Details


Defining the Task Service

"Enter Quote Details" 액티브티를 더블 클릭하여 편집합니다.



Implementation 탭으로 이동합니다.

Human Task 오른쪽의 Add 버튼을 클릭합니다.



Name: EnterQuoteDetails
Pattern: Initiator
Title: Enter Quote

Parameters: 오른쪽의 추가 버튼을 클릭합니다. 오른쪽에 "Browse Data Objects" 창이 열립니다.

RequestQuoteLab - quote 를 파라미터 영역에 드래그 합니다.



아래와 같이 추가가 되면 Enable 을 체크 합니다. OK 버튼 클릭.



OK 버튼 클릭.



QuoteProcessLab -  Business Catalog - HumanTasks 에 보면 방금 만든 휴먼 테스크가 하나 추가되어 있습니다.

"EnterQuoteDetails.task" 더블 클릭.



Task Title: Text and XPath

오른쪽의 Expression Builder 버튼 클릭.



아래와 같이 입력. (Expression Builder 이용)

concat('Enter Quote Details for customer', /task:task/task:payload/ns0:QuoteRequest/ns0:Summary/ns0:AccountName, 'Quote id = ', /task:task/task:payload/ns0:QuoteRequest/ns0:Summary/ns0:OpportunityID)



Generate Form for the Task

Create Form 클릭 - Auto-Generate Task For... 클릭.



Project Name: EnterQuoteUILab



아래와 같이 ADF 프로젝트가 생김. 전부 저장 후 닫기.



Bussiness Practices Review, Approve Deal, Approve Terms, Finalize Contract 4개의 액티브티도 동일한 방식으로 Human Task를 생성합니다.

"Business Practices Review" Human Task 생성.








BusinessPracticesReview.task 파일 편집(더블 클릭)







Approve Deal 구현






Approve Terms 구현





Finalize Contracts 구현



Outcomes 변경.



"Finalize Contracts"의 outcome은 OK 만 설정합니다.







Mapping swim lane Roles to LDAP Roles

"Organization"에서 오른쪽 버튼 클릭 - Open 클릭



Roles 탭에서 작업합니다.

SalesRep 롤 선택 후 맴버를 등록합니다. (웹로직에 등록되어있는 유저를 찾기)



jcooper 유저를 선택합니다.



Approvers 롤은 cdickens 유저.



Business Practices 롤은 jstein 유저.



Contracts 롤은 wfaulk 유저.



Process Owner 롤은 jstein 유저.




Configuration of the Service Task

Now complete the following to add a service to your application which implements the SaveQuote Service Task. First you create the service by adding a Service Reference to the application using the composite editor. Then, you go back to the BPM process and bind the service to the SaveQuote Service Task.

BPM 편집기 상단 오른쪽의 "Goto Composite Editor" 버튼을 클릭합니다.



"File Adapter"를 추가합니다.



Service Name: SaveQuote





Write File 선택.



Directory for Outgoing Files: /tmp/quotes (원하는 곳으로 설정)

File Naming Convention: quote_%SEQ%.txt



메세지 구조를 설정합니다.

URL 오른쪽의 돋보기 버튼 클릭.



Quote.xsd - QuoteRequest 선택.



Next 버튼 클릭.



Finish 클릭.



아래와 같이 File Adapter 컴포넌트가 생성 되었습니다.



다시 BPM 편집기로 넘어와 "Save Quote" 액티브티를 편집합니다.



Implementation: Service Call

Name 오른쪽의 돋보기 버튼 클릭.



"SaveQuote" 선택.



Use Associations 선택 후 편집(연필) 버튼을 클릭합니다.



아래와 같이 오른쪽의 "quote"를 왼쪽의 Input 으로 드래그합니다.



OK 버튼 클릭.



Business Catelog - Services 부분에 SaveQuote 가 추가되어 있는 것을 볼 수 있습니다.





Data Association configuration for conditional flows

The outcomes of the Business Practices Review, Approve Deal and Approve Terms Interactive tasks have to be evaluated for conditional branching. The task outcome of these tasks is a string value of “APPROVE” or “REJECT”. You set these outcomes when you defined the task. The outcomes get mapped to the Data Objects so you can then use the Data Objects in the conditional expressions used for branching.

"Business Practices Review" 액티브티를 열어 편집합니다.

Implementation 탭에서 "Use Associations" 체크 후 편집합니다.



아래와 같이 "businessPracticesOutcome" 데이터를 outcome 출력 인자에 추가에 매핑합니다.



Approve Deal 액티브티는 approveDealOutcome 데이터를 outcome 출력 인자와 매핑합니다.



Approve Terms 액티브티는 approveTermsOutcome 인자.



Business Practices Rejected(Sequence Flow)를 편집합니다.



Properties 탭에서 businessPracticesOutcome == "REJECT" 입력.




Deal or Terms Rejected(Sequence Flow)를 편집합니다.



approveDealOutcome == "REJECT" or approveTermsOutcome == "REJECT"



Business Practices Revie(User)로 가는 Yes(Sequence Flow)를 편집합니다.



businessPracticesReviewRequire == true





Configuration of Script Tasks

Finally, you need to add a Script Task to set the payload (the input data) for the Enter Quote Details task and to determine whether the Business Practices Review activity is required or not. The script goes right before Enter Quote Details. Using a script to set the input data makes testing this process easier but when running such a process for real, the user who initiates the task would enter the input data.

Script(Activity)를 Start와 Enter Quote Details(Activity) 사이에 추가합니다.



Name: Initialize Quote



Implementation 탭에서 User Associations 채크하고 편집합니다.



아래와 같이 quote 데이터를 중앙에 드래그 합니다.



Expression Builder 버튼 클릭.



Mode: XML Literal

<ns1:QuoteRequest xmlns:ns1="http://www.mycompany.com/ns/salesquote">
  <ns1:Summary>
    <ns1:OpportunityID>zzzz2</ns1:OpportunityID>
    <ns1:AccountName>Acme New</ns1:AccountName>
    <ns1:Address>
      <ns1:Street>Demo Way</ns1:Street>
      <ns1:City>Redwood Shores</ns1:City>
      <ns1:State>CA</ns1:State>
      <ns1:Zip>94065</ns1:Zip>
      <ns1:Country>USA</ns1:Country>
    </ns1:Address>
    <ns1:SalesRepId>jcooper</ns1:SalesRepId>
    <ns1:SalesRepName>James Cooper</ns1:SalesRepName>
    <ns1:ValidUntil>2010-05-30</ns1:ValidUntil>
    <ns1:EffectiveDiscount>0.0</ns1:EffectiveDiscount>
  </ns1:Summary>
  <ns1:QuoteRequestStatus/>
</ns1:QuoteRequest>



businessPracticesReviewRequire 데이터를 추가합니다.



Expression Builder 클릭.



Mode: XPath Exp.

Expression: false()



OK 버튼 클릭.



Enter Quote Details(Activity)의 Data Associations 편집 화면에서 uuote 데이터를 quoteRequest 입력 인자에 추가합니다.




Deploying the process

배치 합니다.





관련된 Human Task 프로젝트도 같이 배치합니다.












반응형
//
반응형
Process Simulation Overview

Business process simulation until now has seldom been implemented. Because of tight development schedules, the plan to simulate the current “as-is” and desired “should-be” processes typically falls victim of having too little time. Simulation is a powerful tool and it is worth the time spent doing simulations before going into production. It helps run “what-if” experiments to see what the impact will be of:

• Reducing or increasing the number of people assigned to an activity.
• A sudden increase of the number of instances flowing through the process.
• Changing the approval ratio from 70% approved / 30% disapproved to a worse case 50% approved / 50% disapproved.

This can help avoid the embarrassment and cost of launching a new process with a flaw that only becomes obvious on day 3 of production. It can verify that the desired output meets the metric objectives and easily finds bottlenecks in processes and leads to breakthroughs.



Process Simulation Lab

This exercise will demonstrate how a business analyst can analyze and propose changes to business processes using Oracle BPM Studio.

The objectives of this exercise are

• Run simulations on business processes and analyze the following results.
   - Throughput and process analysis
   - Activity-based costing
   - Resource allocation
   Make changes to the process to optimize the flow

The simulation algorithm is based on discrete events and can process events in a serial fashion as they occur in time. You need to create Process Simulation Models and Project Simulation Definitions to run simulation. The Process Simulation Model captures a “What-if scenario” for a particular business process model. You can have multiple Process Simulation Models for a particular business process model. This allows you to create different simulations based on different combinations of resource allocations and activity behavior. The Project Simulation Definition is used to take the dependency and shared resources across processes in to account. It consists of Process Simulation Models of multiple processes.

The simulation does not execute the actual code of each activity within the process. However, by configuring parameters within the models and definitions, you can mimic the behavior of your business process. You need to ask the right questions to get the right response! In order to perform simulation the process needs to be complete and semantically valid.


Creating Process Simulation Models

"QuoteProcessLab - Simulations - Simulation Models" 에서 오른쪽 버튼 클릭 - "New Process Simulation" 클릭.


Simulation Model name: NormalLoad


"Start" Flow Nodes

Distribution Type: Constant
Period: 5 Minutes



"Approvals Outcome" (Gateway) Flow Nodes

분기의 흐름 정도를 조정합니다. 막대바를 조종합니다.

Enter Quote Details: 0.0
Finalize Contracts: 1.0

무조건 Finalize Contracts 쪽으로 흐르게 되는군요.



"Approve Deal" Flow Nodes

Duration 탭
   Distribution type: Normal
   Mean: 20 minutes
   Standard Devlation: 20 seconds



Cost 탭
   Cost: $100



나머지 흐름들도 아래와 같이 설정 합니다.
























Creating Process Simulation Models

"Simulation Definitions" 에서 마우스 오른쪽 버튼 클릭 - "New Simulation" 클릭.



Simulation Definition: AsIsSalesQuoteSimulation



Duration: 10 hours

"Include in simulation" 칼럼 아래의 채크 박수 선택.



Resources 탭으로 이동합니다.

+ 버튼을 클릭하고 아래와 같이 정보를 입력합니다.

Roles 부분을 더블클릭 하면 나오는 돋보기 버튼을 클릭하여 역할을 선택합니다.



Approvers 선택.



아래와 같이 나머지 리소스를 추가합니다.



Running the simulation

JDeveloper 아래쪽 영역에 Simulations 탭을 선택합니다. (없다면 View - Simulations)

"Run to end" 버튼을 클릭합니다. 한번에 시뮬레이션이 끝나버립니다.



아래와 같이 (비슷한) 결과가 나옵니다.




Analyze the Simulation Results

아래와 같은 부분을 조절하여 결과를 여러가지 화면으로 볼 수 있습니다.





반응형
//
반응형
※ 문서는 11.1.1.3(11g PS2)로 만들어져 있는데 저는 11.1.1.4(11g PS3)로 하였습니다. 화면(UI)이 약간 다를 수 있습니다.

Introduction

The first exercise is based on building the Sales Quote Process model. You first create an outline of the process flow as a BPMN model using the Oracle BPM Studio. Oracle JDeveloper with the BPMN Editor extension is called Oracle BPM Studio. Implementation details are added in a later exercise.

The Sales Quote scenario is as follows:
• The business process implements a solution for Sales Representatives to submit Sales Quotes and manage all the approvals within a particular Sales organization. A quick recap on the business process definition and its flow is detailed below.
• The Business Process is triggered by a Sales Representative creating a Task to Enter the Quote details in the “Enter Quote” interactive step.
• The next step is to determine the list of approvers for the Quote using business rules and also to determine whether additional review by Business Practices is required. This is accomplished through the “Determine Approval Rules” step.
• After the rules have been evaluated, the next step is to check whether “Business Practices Review” is required and if “yes” go through the “Business Practices Review” step.
• The Quote then has to get approved for the deal structure and terms. After the “Business Practices Review” has been completed, the process instance moves to the “Approve Quote” and “Approve Terms” activities that are executed in parallel.
• The “Approve Quote” activity is executed by approvers in the “Approvers” role and the “Approve Terms” by individuals that have been assigned the “Contracts” role in the organization.
• Once these 2 steps in the business process have been completed successfully, the process instance moves on to the “Finalize Contracts” step and waits for its final approval by an individual in the “Contracts” role.

The complete flow is shown in the figure below.




Creating the BPM Project for Quote Process

JDevelpoer 메뉴에서 File - New 클릭.



Applications 카테고리에서 BPM Application 선택.



Application Name은 SalesQuoteLab 입력.



처음 어플리케이션을 만들면 하나의 프로젝트도 동시에 생성하는군요...

Project Name에 QuotePorcessLab 입력. Next 클릭.



Composite With BPMN Process 선택. Finish 클릭.


 

Creating the high-level outline of the BPMN process

프로젝트가 만들어지고 아주 조금 기다리면 Create BPMN Process 마법사(?) 창이 뜹니다.

Name에 ReuqestQuoteLab 입력. Type은 Manual Process 선택. Finish 버튼 클릭.



아래와 같이 Start와 End 지점과 하나의 기본 유저 테스트가 하나 생성되어 있습니다.

마치 무슨 설계할때 쓰는 그 무엇(기억이...) 같이 생겼습니다. 행으로는 롤(역할)이 있습니다.

UserTask 액티브를 더블클릭.



Name을 Enter Quote Details 변경.



롤(역할)을 추가해보겠습니다.

BPM Project Navigator를 봐야 하는데 화면에 없다면 메뉴중 View - BPM Project Navigator 를 선택해서 보이게 합니다.



QuoteProcessLab - Oranization 에서 오른쪽 버튼 클릭 후 Open 클릭.



기본으로 추가 되어있는 "Role"을 선택 후 Edit 버튼 클릭.



Name을 SalesRep로 변경.



이번에는 Role를 추가해봅시다. Add 버튼 클릭.



Name에 Approvers 입력.



Business PracticesContracts도 추가해줍니다.



이제 Organization 편집창을 닫고, 다시 RequestQuoteLab 화면으로 갑니다.

만약 닫아서 없다면 BPM Project Navigator에서 QuoteProcessLab - Processes - RequestQuoutLab을 선택합니다.



화면의 빈 공간에서 마우스 오른쪽 버튼 클릭. Add Role 클릭



Business Practices 선택. OK 버튼 클릭.



화면 왼쪽에 롤(역할)이 하나 추가 되었습니다.



액티브를 추가할 것입니다. 만약 화면 오른쪽에 Component Palette 창이 보이지 않으면 View 에서 보이게 합시다.



User 액티브를 "Enter Quote Details" 액티브와 End 사이의 선에 드래그 앤 드랍합니다.

액티브를 드래그해서 선 위에 올려 놓으면 선 색이 파란색으로 바뀌게 됩니다.

드랍을 하면 두 액티브 사이에 삽입이 됩니다.



Name에 Business Practices Review 입력. OK 버튼 클릭.



"Business Practices Review" 액티브와 "End" 액티브를 "Business Practices" 롤 영억으로 옮깁니다.



"Approvers"와 "Contracts" 롤 영역을 추가합니다.



User 액티브를 Approvers 영역에 추가합니다.



Name은 Approve Deal 입력. OK 버튼 클릭.



기본 "Business Practices Review" 액티브에서 End로 가던 선을 삭제합니다.



Sequence Flow 를 "Etner Quote Details" 액티드에서 "Business Practices Review" 액티브로 연결합니다.



같은 방법으로 "Approve Deal" 액티브와 End와 연결합니다.



아래와 같이 "Approve Terms"와 "Finalize Contracts" 유저 액티브를 추가 하고 선을 연결합니다.



"Finalize Contracts" 액티브와 End 사이에 Service Task 액티브를 추가합니다.

Name은 Save Quote 입력.




Adding conditional split for Business Practices Review Step

조건분기 액티브를 사용 해봅시다!

Exclusive(XOR) 액티브를 "Business Practices Review" 액티브 왼쪽 공간에 추가합니다.



Name은 Is Business Practices Review required?



"Enter Quote Details" 액티브에서 "Business Practices Review" 액티브로 가는 선(흐름)을 방금 추가한 XOR 액티브로 옮깁니다.

화살표 끝쪽에서 드래그 하면 됩니다.



XOR 액티브에서 마우슨 오른쪽 버튼 클릭. Add conditional sequence flow 클릭.



"Business Practices Reivew" 액티브로 선을 클릭합니다.



다시 XOR 액티브에서 오른쪽 버튼 클릭. Add default sequence flow 클릭.



"Approve Deal" 액티브와 연결합니다.



default sequence flow는 선에 표시가 되어있는 것을 확인 할 수 있습니다. (이게 처음에는 햇갈리더라구요...)



첫번째 추가했던 선(흐름)을 더블클릭 합니다.



Name을 Yes로 변경합니다.



두번째 선(default)을 더블클릭 합니다.



Name을 No로 변경합니다.



Parallel 액티브를 "Approve Deal" 오른쪽 공간에 추가합니다.



Name은 Approvals로 합니다.



두개의 액티브가 생기는데 다른 한쪽의 액티브 이름을 Approvals Merge로 변경합니다.



처음 XOR와 유저 액티브에서 "Approve Deal" 액티브로 갔던 선(흐름) 2개를 Approvals 로 옮깁니다.



"Approve Deal" 액티브에서 "Approve Terms" 액티브로 가는 선을 삭제합니다.



"Approve Deal" 액티브를 두 패러럴(Parallel) 사이로 삽입합니다.



"Approvals" 액티브에서 마우스 오른쪽 버튼 클릭. Add default sequence flow 클릭.



"Approvals Merge" 로 선을 연결합니다.



"Approve Terms" 액티브에서 "Finalize Contracts" 액티브로 가는 선을 삭제 후, 아래와 같이 삽입합니다.



"Approvals Merge" 액티브에서 "Finalize Contracts" 액트로 가는 선(흐름)을 연결합니다.



아래와 같은 화면이 나왔습니다. (각 롤 영역 안에 액티브가 들어가 있는지 확인)




Adding loop for redo of Quote

주문 승인을 거절했을 때 다시 되돌아가는 로직을 넣어봅시다!

"Buisness Practices Review" 액티브 오른쪽 공간에 Exclusive(XOR) 액티브를 추가합니다.

Name은 Business Practices Outcome.



"Business Practices Review" 액티브에서 "Approvals" 액티브로 가던 선을 방금 추가한 XOR 액티브로 옮깁니다.



방금 추가한 XOR 액티브에서 마우스 오른쪽 버튼 클릭. Add conditional sequence flow 클릭.



"Enter Quote Details" 액티브로 선을 연결 한 후, Name은 Business Practices Rejected로 설정합니다.



다시 오른쪽 버튼 클릭. Add default sequence flow 클릭.



"Approvals" 액티브로 선을 연결 후, Name은 Business Practices Approved로 설정합니다.



"Approvals Outcome" 액티브와 "Finalize Contracts" 액티브 사이에 XOR 액티브(Name: Approvals Outcome)를 추가 후 아래와 같이 흐름을 추가합니다.

default sequence flow: "Approvals Outcome" → "Finalize Contracts", Name: Approved

conditional sequence flow: "Approvals Outcome" → "Enter Quote Details", Name: Deal or Terms Rejected



아직은 속 내용을 완벽히 구한하지 않았기 때문에 경고(느낌표)가 많이 뜰 겁니다. ㅎㅎ







반응형
//
반응형
Introduction

In this chapter, you will learn to use Oracle Service Bus to
    • Virtualize Application Services through JCA Adapters such as Oracle eBusiness Suite, Siebel, PeopleSoft etc.
    • Mediate access to data in the Database along with Protocol bridging Employees at Mega Corporation use the
      Employee Self Service portal to submit

Requisition requests for items required to carry on their job functions. Once the Requisition gets approved, Purchase Order is generated for the Requisition. The Purchase Order is then submitted to the Supplier, Pega Corporation. Supplier validates the requestor’s Credit Card, approves the Purchase Order if required, and fulfills the Order.

Mega Corporation has implemented the Requisition process in Oracle eBusiness Suite. Supplier, Pega Corporation, has implemented the Purchase Order process in Oracle SOA Suite.

Overview of the business processes at work between Mega, on the left, with Procure to Pay business process, interfacing with Pega, on the right, with Order-to-Cash business process.





※ 세션 생성과 완료는 생략 하겠습니다. 수정하려면 세션을 만들어야 하고, 테스트 해볼려면 수정사항이 완료되어 있어야 합니다.



Create Requisition

BPEL 에서 만든 JCA DB Adapter 를 OSB에서 불러와서 사용해 봅시다!

 



Create Database Adapter artifacts in JDeveloper

JDeveloper 실행 - Application 생성.



Application Name: SOADemo
Application Template: SOA Application



Project Name: DBArtifacts

 

Finish 클릭.

 

Database Adapter 컴포넌트를 External References 영역에 드래그 앤 드랍합니다.

 

Service Name: createRequisition


 
Connection 추가

 

soademo 커넥션 정보 입력.

 

JNDI Name: eis/DB/soademoDatabase

※ 기본적으로 eis/DB/{Connection Name} 으로 설정 됩니다.

 

※ 물론 웹로직 콘솔에 아래와 같이 세팅이 되어 있어야 겠죠?

 

Operation Type: Perform an Operation on a Table - Insert Only

 

Inport Tables... 클릭.


 
"OSB_REQUISITION" 테이블 선택.

 

오른쪽에 들어가 있어야 선택된 겁니다.

 

Next 클릭.

 

기본키는 REQID 선택.

 

Finish 클릭.

 

Database Adapter가 추가 되었습니다.




Import Database Adapter artifacts into Oracle Service Bus

Oracle Service Bus Console 접속.

Requisition 프로젝트를 생성합니다.


Requisition 프로젝트 아래에 Resources 폴더를 생성합니다.


Resources 폴더에서 리소를 추가합니다. Zipped Resources 선택.

※ 랩 문서에서는 soa와 jdeveloper가 로컬에서 돌아가서 Resources form URL 선택 후 file:// 을 사용했는데, 저는 soa가 다른 곳에 띄워져 있어서 zip 파일을 업로드 하겠습니다.



JDeveloper로 만든 프로젝트(DBArtifacts)로 가서 아래와 같은 3개의 파일과 1개의 포더를 압축해 놓습니다.



zip 파일을 업로드합니다.


아래와 같이 4개의 파일이 선택되어져 있어야 합니다.

Requisition/Resources/createRequisition_db – JCA Binding
Requisition/Resources/createRequisition – WSDL
Requisition/Resources/xsd/createRequisition_table – XML Schema
Requisition/Resources/createRequisition-or-mappings – XML Document

Import 클릭.


Inport 되었습니다.



Create Business Service from Database Adapter JCA File

Requisition 프로젝트 아래 BusinessServices 폴더를 생성합니다.

Resources 폴더로 가서 Generate 버튼을 클릭합니다.


Requisition - BusinessServices 선택. Generate 버튼 클릭.


Requisition - Resources 폴더에 가보면 아래와 같이 2개(WSDL, BS)가 생성되어 있습니다.



Create Proxy Service for Business Service

Requisition 프로젝트 아래에 ProxyServices 폴더를 생성합니다.


ProxyServices 폴더에서 Proxt Service 를 생성합니다.


Service Name: createRequisition

Create From Existing Service 아래에 Business Service 선택 후 Browse... 클릭.


Requisition/BusinessServices/createRequisition_db 선택 후 Submit 클릭.


Next 클릭


Protocal: http


EndpointURI 는 자동으로 만들어집니다. Next 클릭.


Last 클릭.


Save 클릭.



Update Proxy Service Message Flow

Requisition - ProxyServices 로 이동.



createRequisition 의 Message Flow 수정.


createRequisition 클릭 - Add Pipeline Pair 선택



Request Pipeline 클릭 - Add Stage



stage1 클릭 - Edit Stage



Add an Action 클릭 Reporting - Report


Report: $body
Key Name: REQ_ID
variable: body

<XPath> 클릭.


./cre:OsbRequisitionCollection/cre:OsbRequisition/cre:reqid

입력 후 Save All 클릭.



Test

createRequisition(Proxy Service)를 테스트 해봅시다!



주문 정보 입력 후 Execute 버튼 클릭.



실행 되었습니다.


Message Reports 에 가보면 Report 가 남아있는 것을 볼 수 있습니다.


직접 DB를 select 해보면 인서트가 되었습니다.




Receive PO

DB Pooling 기능을 하는 JCA DB Adapter 를 가져와서 사용해 봅시다!



Create Database Adapter artifacts in Jdeveloper

전에 JDeveloper 로 만들었던 DBArtifacts 프로젝트를 그냥 사용합니다.

Database Adapter 컴포넌트를 Exposed Services 영역에 추가 합니다.


Service Name: receivePO



Connection: soadameDatabase
JNDI Name: eis/DB/soademoDatabase


Operation Type: Poll for New or Changed Records in a Table


"OSB_PURCHASEORDER" 테이블 선택.


기본키는 ID


"Delete the Row(s) that were Read" 선택 (읽어 들인 후 삭제 처리) - FInish 클릭.


Database Adapter 가 추가되었습니다.



Import Database Adapter artifacts into Oracle Service Bus

PoProcessing 프로젝트와 하위에 BusinessServices, ProxyServices, Resources 폴더를 생성합니다.



Resources 폴더에서 리소스를 추가합니다. Zipped Resources 선택.


아래와 같이 4개의 파일을 압축한 zip 파일을 파일 첨부합니다.



Next 클릭.


xsd/createRequisiton_table.xsd 파일은 전에 사용했던 파일이니 필요 없습니다.

POProcessing/Resources/receivePO_db – JCA Binding
POProcessing/Resources/receivePO – WSDL
POProcessing/Resources/xsd/receivePO_table – XML Schema
POProcessing/Resources/receivePO-or-mappings – XML Document



Create Proxy Service from Database Adapter JCA File

POProcessing 프로젝트 - Resources 폴더에서 receivePO_db(JCA Binding)의 오른쪽 Generate 버튼 클릭.


Project: POProcessing
Sub-folder: ProxyServices

Generate 클릭.


POProcessing - ProxyServices 폴더에 보면 Proxy Service가 생성 되었습니다.



Import WSDL for POProcessing Composite Service in SOA Suite

POProcessing - Resources 폴더에서 리소스를 추가합니다. Resources from URL 선택.



현재 SOA에 올라가 있는 POProcessing 조합의 WSDL 주소를 복사해 넣습니다.


Resource Name: receivePO_SOA


Import 클릭.



Create Business Service from WSDL

POProcessing - BusinessServices 폴더에서 비지니스 서비스를 생성합니다.



Service Name: receivePO

WSDL Web Service 선택 후 Browse... 클릭.


POProcessing/Resources/receivePO_SOA 선택 후 Ports - execute_pt 선택.

Submit 클릭.


Next 클릭.


Last 클릭.


Save 클릭.



Complete Proxy Service Message Flow

POProcessing - ProxyServices 폴더의 receivePO_db(Proxy Service)의 메세지 흐름을 편집합니다.



receivePO_db 클릭 - Add Route 클릭.



RouteNode1 클릭 - Edit Route 클릭.



Add an Action 클릭 - Communication - Routing 클릭.


<Service> 클릭.


POProcessing/BusinessServices/receivePO 선택 - Submit 클릭.


Operation: execute


Save 버튼 클릭.


receivePO_db 클릭 - Add Pipeline Pair 클릭.



Request Pipeline 클릭 - Add Stage 클릭.



stage1 클릭 - Edit Stage 클릭.



Add an Action 클릭. Reporting - Report 클릭.



Report: $body
Key Name: DB_ID
variable: body

<XPath> 클릭.


./rec:OsbPurchaseorderCollection/rec:OsbPurchaseorder/rec:id

Save 클릭.


Save 클릭.


stage1 아래 Stage 추가



stage2 수정


Message Processing - Assign 액션 추가.


<Expression> 클릭.


$body/rec:OsbPurchaseorderCollection/rec:OsbPurchaseorder

Save 클릭.


variable: dbPO

Save All 클릭.



dbPO_to_soaPO.xq 파일을 압축해 놓습니다.



POProcessing - Resources 폴더에서 리소스를 추가합니다. (Zipped Resources)



파일을 업로드 하고, XQuery 리소스 타입(Resource Type)의 확장자(File Extension)를 ".xq"로 변경합니다.

Next 클릭.


Import 클릭.


다시 POProcessing - ProxyServices 폴더에서 receivePO_db 프락시 서비스의 메시지 흐름을 수정합니다.



stage2 를 수정합니다.



Message rocessing - Assign 액션을 추가합니다.



<Expression> 클릭.


편지창 위에 "XQuery Resources" 클릭.


XQuery: 오른쪽에 Browse... 버튼 클릭.


dbPO_to_soaPO 선택 후 Submit 클릭.



Binding: $dbPO

Save 버튼 클릭.


variable: soaPO

Message Processing - Assign 액션 추가.


"<soap-env:Body>{$soaPO}</soap-env:Body>" 입력 후 Save 클릭.



variable: body

Save 클릭.


stage2 아래에 Stage 추가.


stage3 수정.


Reporting - Report 액션 추가.


Report: $body
Key Name: SOA_ID

<XPath> 클릭.


화면 왼쪽 중간에 User Defined Namespaces 영역에서 "Add Namespace" 클릭.



Prefix: ord
URI: http://xmlns.oracle.com/ns/order

Add 버튼 클릭.



./ord:PurchaseOrder/ord:ID

Save 버튼 클릭.


variable: body

Save All 버튼 클릭.



Test

테스트 해봅시다!

Requisition - ProxtServices 폴더에서 createRequisition 프락시 서비스를 테스트 합니다.


주문 정보를 입력 후 Execute 버튼 클릭.



실행 되었습니다.


Report 내용을 보면 아래와 같이 Report가 남았습니다.


EM 에서 보면 POProcessing 이 실행되 것을 확인할 수 있습니다.





근데 이게 보면 좀 이상합니다.

Requisition 프로젝트의는 입력을 받아서 "OSB_REQUISITION" 테이블에 INSERT 합니다.



POProcessing 프로젝트는 OSB_PURCHASEORDER 테이블의 데이터를 폴링(Pooling)해서 POProcssing 웹서비스를 실행합니다.



그런데 테스트를 해보면 Requisition 시작에부터 POProcessing 끝까지 한번에 실행 되었습니다.

왜 그럴까여?!!!

이유는 거의 마지막에 작업했던 dbPO_to_soaPO 바인딩 때문에 그렇습니다.


그럼 POProcessing 프로젝트만 제대로 되는지 테스트 해보겠습니다.

"OSB_PURCHASEORDER" 테이블에 직접 데이터를 INSERT 해보겠습니다.

insert into osb_purchaseorder values (
  '1111', '2222', 'iPod shuffle', 'Electronics', 1, 500, 'Initial','Mastercard','1234-1234-1234-1234'
);

commit;
잠시후 select 해보면 데이터가 없습니다. 네.. JCA Adatper 가 가져갔습니다.

OSB 콘솔과 EM에서 확인해보면 아래와 같이 실행된 것을 볼 수 있습니다. (시간 확인)





 
반응형
//
반응형
$ uname -srvm
Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64

$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

SOA Suite 11.1.1.4.0 (soa_server1, soa_server2 클러스터 구성)

JDeveloper 에서 SOA 서버로 배치(deploy)를 하려고 할때 "java.io.IOException: Too many open files" 에러가 났습니다.

soa나 jdeveloper의 문제가 아니고 OS 환경 설정의 문제더군요....

SOA를 구동하는 계정으로 로그인해서 'ulimit -a' 를 입력합니다.

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

값을 설정하지 않았다면 1024로 설정 됩니다.

root 계정으로 /etc/security/limits.conf 파일을 수정합니다.

# vi /etc/security/limits.conf

# 아래에 추가 (계정명: weblogic)
weblogic        soft    nofile  4096
weblogic        hard    nofile  4096

마지막 숫자를 적당한 값으로 설정합니다.

이제 SOA 구동시킬 계정으로 로그인 후 'ulimit -a' 입력

$ ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

이제 weblogic(admin), soa, bam 등등 다시 시작 후 배치(deploy) 하니 잘 되는군요.. ㅎㅎ

반응형
//
반응형

SOA Suite PS3 (11.1.1.4.0) 에서 soa, bam 구동시에 WSM-062107, WSM-06219 경고가 엄청나게 나는 문제가 생겼습니다.

뭔진 잘 모르겠지만 -_-.. 띄우는데 엄청 오래 걸려서 문제가 되었습니다. (soa_server1.log)

이럴 때는 hosts 파일을 수정해서 "127.0.0.1" 을 "localhost"로 추가(수정)하니 잘 되는군요... ㅠ_ㅠ

저의 경우는 hostname 이 127.0.1.1 로 잡혀 있더군요. 이것은 127.0.0.1 로 변경하였습니다.

# vi /etc/hosts

192.168.0.192   antop-saltware  # Added by NetworkManager
127.0.0.1       localhost       {hostname}
# ::1   {hostname}  localhost6.localdomain6 localhost6
# 127.0.1.1     {hostname}

※ 여기서 {hostname} 은 진짜 "{hostname}" 문자가 아니라 OS 마다 다른 hostname 입니다.

이 문제를 해결하니 orace-bam 이 구동 실패하는 문제(bam_server1.log)가 자동 해결 되는군요.. 휴~ :D





반응형

'Oracle Solution > Trouble Shooting' 카테고리의 다른 글

java.io.IOException: Too many open files  (0) 2011.04.14
//