Beruflich Dokumente
Kultur Dokumente
com/en/)
SignIn(http://www.oracle.com/webapps/redirect/signon?nexturl=https://docs.oracle.com/middleware/11119/soasuite/SOASE/bp_tutorialhwf_.htm)
Home(http://docs.oracle.com)/Middleware(../../index.html)/OracleSOASuite(../index.html)
OracleFusionMiddlewareDeveloper's
GuideforOracleSOASuite
31HumanWorkflowTutorial
Thischapterdescribeshowtodesignyourfirstworkflowfromstarttofinish.
Thischapterincludesthefollowingsections:
Section31.1,"IntroductiontotheHumanWorkflowTutorial"(#CEGCBFDB)
Section31.2,"Prerequisites"(#BABIEDCJ)
Section31.3,"CreatinganApplicationandaProjectwithaBPELProcess" (#BABGBIAA)
Section31.4,"CreatingtheHumanTaskServiceComponent"(#BABEEIBA)
Section31.5,"DesigningtheHumanTask"(#BABGGFGC)
Section31.6,"AssociatingtheHumanTaskandBPELProcessServiceComponents"(#BABDAFDF)
Section31.7,"CreatinganApplicationServerConnection" (#CEGEHHHF)
Section31.8,"DeployingtheSOACompositeApplication" (#BABDHJGC)
Section31.9,"InitiatingtheProcessInstance"(#BABDECDB)
Section31.10,"CreatingaTaskFormProject"(#BABBBDHI)
Section31.11,"ActingontheTaskinOracleBPMWorklist"(#BCEICDFI)
Section31.12,"DeployingtheTaskForm"(#CEGGEBJD)
Section31.13,"AdditionalTutorials"(#CEGCFFAG)
31.1IntroductiontotheHumanWorkflowTutorial
Theapplicationdevelopedinthistutorialisbasedonthefollowingusecase:
anemployeesubmitsavacationrequest
themanagerapprovesorrejectsthevacationrequest
theemployeereceivesanotificationthatapprovesorrejectstheirrequest
ThistutorialdescribeshowtocreateanewapplicationandSOAprojectandhowtodesignahumantaskto
sendavacationrequesttoamanagerforapprovalorrejection.
TheresultingSOAcompositeapplicationcontainsthefollowingcomponents:
ABPELprocess
Ahumantask,forapprovingavacationrequestsubmittedbyanemployee
ItalsodescribeshowtocreateanOracleADFbasedtaskformthatenablestheendusertoactuponthe
vacationrequestoncetheapplicationisdeployedandrunning.TocreateanOracleADFbasedtaskformyou
mustcreateanewapplicationandanewproject.
Thistutorialguidesyouthroughthefollowingtasks:
UsingtheSOACompositeEditor
UsingtheHumanTaskEditor
ModelingasingleapprovalworkflowusingOracleBPELDesigner
CreatinganOracleADFbasedOracleBPMWorklist
UsingOracleBPMWorklisttoviewandrespondtothetask
31.2Prerequisites
Thistutorialmakesthefollowingassumptions:
OracleSOASuiteisinstalledonahostonwhichtheSOAInfrastructureisconfigured.
YouarefamiliarwithbasicBPELconstructs,includingBPELactivitiesandpartnerlinks,andbasicXPath
functions.FamiliaritywiththeSOACompositeEditorandOracleBPELDesigner,theenvironmentfor
designinganddeployingBPELprocesses,isalsoassumed.
1.CreateafilenamedVacationRequest.xsdwiththefollowingsyntax.Thisfileincludestheschemafor
thevacationrequestandsubsequentresponse.
<schemaattributeFormDefault="qualified"elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/VacationRequest"
xmlns="http://www.w3.org/2001/XMLSchema"><element
name="VacationRequestProcessRequest"><complexType><sequence><element
name="creator"type="string"/><elementname="fromDate"type="date"/><element
name="toDate"type="date"/><elementname="reason"type="string"/></sequence>
</complexType></element><elementname="VacationRequestProcessResponse">
<complexType><sequence><elementname="result"type="string"/></sequence>
</complexType></element></schema>
Note:
TheVacationRequest.xsdfileisalsoavailablefordownloadaspartoftutorialworkflow100
VacationRequest.SeeSection31.13,"AdditionalTutorials"(#CEGCFFAG)forinformationon
downloadingthisandothertutorials.
31.3CreatinganApplicationandaProjectwitha
BPELProcess
TocreateanapplicationandaprojectwithaBPELprocess:
1.StartOracleJDeveloper.
2.FromtheFilemainmenu,selectNew>Applications>SOAApplication.
3.ClickOK.
4.IntheApplicationNamefield,enterVacationRequest,andclickNext.
5.IntheProjectNamefield,enterVacationRequest,andclickNext.
6.IntheCompositeTemplatelist,selectCompositewithBPELProcess,andclickFinish.
7.TheCreateBPELProcessdialogappears.
8.IntheNamefield,enterVacationRequestProcess.
9.GotothebottomoftheCreateBPELProcessdialog.
10.TotherightoftheInputfield,clicktheSearchicon.
TheTypeChooserdialogappears.
11. Intheupperrightcorner,clicktheImportSchemaFileicon.
TheImportSchemaFiledialogappears.
12.BrowseforandselecttheVacationRequest.xsdfileyoucreatedinSection31.2,"Prerequisites."
(#BABIEDCJ)
13.ClickOKuntilyouarereturnedtotheTypeChooserdialog,asshowninFigure311(#BABDBAAC).
Figure311TypeChooserDialogwiththeRequestandResponseElements
Descriptionof"Figure311TypeChooserDialogwiththeRequestandResponseElements"(img_text/bp_ht_vacreq1.htm)
14.SelecttheinputelementVacationRequestProcessRequest,andclickOK.
YouarereturnedtotheCreateBPELProcessdialog.
15.TotherightoftheOutputfield,clicktheSearchicon.
16.SelecttheoutputelementVacationRequestProcessResponse,andclickOK.
YouarereturnedtotheCreateBPELProcessdialog,asshowninFigure312(#BABJEFJB).
Figure312BPELProcessDialog
Descriptionof"Figure312BPELProcessDialog"(img_text/bp_ht_vacreq2.htm)
17.Acceptthedefaultvaluesforallothersettings,andclickOK.
ABPELprocessservicecomponentiscreatedintheSOACompositeEditor,asshowninFigure313
(#BABBCBIF).BecauseExposeasaSOAPservicewasselectedintheCreateBPELProcessdialog,the
BPELprocessisautomaticallyconnectedwithaservicebindingcomponent.Theserviceexposesthe
SOAcompositeapplicationtoexternalcustomers.
Figure313BPELProcessinSOACompositeEditor
Descriptionof"Figure313BPELProcessinSOACompositeEditor"(img_text/bp_ht_vacreq3.htm)
FormoreinformationaboutservicecomponentsandtheSOACompositeEditor,seeChapter2,
"DevelopingSOACompositeApplicationswithOracleSOASuite."(fod_intro2.htm#CHDEHIJJ)
31.4CreatingtheHumanTaskServiceComponent
Youarenowreadytocreatethehumantaskservicecomponentinwhichyoudesignyourhumantask.
Tocreatethehumantaskservicecomponent:
1.FromtheServiceComponentssectionoftheComponentPalette,dragaHumanTaskintotheSOA
CompositeEditor.
TheCreateHumanTaskdialogappears.
2.EnterthedetailsdescribedinTable311(#BABFDEAH).
Table311CreateHumanTaskDialogFieldsandValues
Field
Value
Name
EnterVacationRequestTask.
Namespace
Acceptthedefaultvalue.
CreateCompositeServicewithSOAP
Bindings
Donotselectthecheckbox.Instead,youcreate
ahumantaskthatyoulaterassociatewiththe
BPELprocessyoucreatedinSection31.3,
"CreatinganApplicationandaProjectwitha
BPELProcess."(#BABGBIAA)TheBPELprocess
wascreatedwithanautomaticallyboundweb
service.
3.ClickOK.
TheHumanTaskiconappearsintheSOACompositeEditorabovetheBPELprocess,asshownin
Figure314(#BABIGGFD).
Figure314HumanTaskIconinSOACompositeEditor
Descriptionof"Figure314HumanTaskIconinSOACompositeEditor"(img_text/bp_ht_vacreq4.htm)
4.DoubleclicktheHumanTaskicon.
TheHumanTaskEditorappears.Youarenowreadytobegindesignofyourhumantask.
31.5DesigningtheHumanTask
Todesignthehumantask:
1.IntheTaskTitlefield,enterRequestforVacation.
2.Acceptthedefaultvaluesforoutcomes(APPROVEandREJECT).Forthistask,theseoutcomes
representthetwochoicesthemanagerhasforactingonthevacationrequest.
3.ClicktheDatatabontheleftsideoftheeditor.
4.ClicktheAddicontospecifythetaskpayload.
5.SelectAddstringparameter.
TheAddTaskParameterdialogisdisplayed.Younowcreateparameterstorepresenttheelementsin
yourXSDfile.Thismakesthepayloaddataavailabletotheworkflowtask.
6.SelectElement.
7.TotherightoftheElementfield,clicktheSearchicon.
TheTypeChooserdialogappears.
8.ExpandandselectProjectSchemaFiles>VacationRequest.xsd>
VacationRequestProcessRequest,andclickOK.Figure315(#BABBIBFJ)providesdetails.
Figure315TypeChooserDialog
Descriptionof"Figure315TypeChooserDialog"(img_text/bp_ht_vacreq5.htm)
9.EnsurethattheEditableviaworklistcheckboxisselected.Thisprovidesyouwiththeoptiontomodify
thisparameterduringruntimefromOracleBPMWorklist.
10.ClickOKontheAddTaskParameterdialog.
11. ClicktheAssignmenttabontheleftsideoftheeditor.
12.Highlightthe<Editparticipant>boxbelowStage1,asshowninFigure316(#BABEJIBA).
Figure316AssignmentandRoutingPolicy
Descriptionof"Figure316AssignmentandRoutingPolicy"(img_text/bp_ht_vacreq6.htm)
13.AtthetopoftheHumanTaskEditor,clicktheEditicon.
TheEditParticipantTypedialogappears.Younowaddparticipantstothistask.AsdescribedinSection
27.2.1.1.2,"ParticipantType,"(bp_introhwf_shared.htm#CACIFGCJ)OracleSOASuiteprovidesseveraloutof
theboxpatternsknownasparticipanttypesforaddressingspecificbusinessneeds.
14.AcceptthedefaultparticipanttypeofSinglethatdisplaysintheTypelist.Youselectthistypebecausea
singleassignee,themanager,actsonthevacationrequesttask.
15.IntheParticipantNamestable,clicktheAddicon,andselectAddUser.
Thisparticipanttypeactsaloneonthetask.
16.ClicktheDataTypecolumn,andselectByExpressionfromthelistthatisdisplayed.Figure317
(#BABBCJDJ)providesdetails.
Thisactionenablesthetasktobeassigneddynamicallybythecontentsofthetask.Theemployeefiling
thevacationrequestcomesfromtheparameterpassedtothetask(thecreatorelementintheXSDfile
youimportedinSection31.3,"CreatinganApplicationandaProjectwithaBPELProcess" (#BABGBIAA)).
Thetaskisautomaticallyroutedtotheemployee'smanager.
Figure317SelectionofByExpressionfromtheDataTypeColumn
Descriptionof"Figure317SelectionofByExpressionfromtheDataTypeColumn"(img_text/bp_ht_vacreq7.htm)
17.IntheValuecolumn,clicktheBrowseicon(thedots)toinvoketheExpressionBuilderdialog.
18.InthedropdownlistintheFunctionssection,selectIdentityServiceFunctions.
19.SelectgetManager.Thisfunctiongetsthemanageroftheuserwhocreatedthevacationrequesttask.
20.AbovetheFunctionssection,clickInsertintoExpression.
21.Placethecursorbetweentheparenthesesofthefunction.
22.IntheSchemasection,expandtask:task>task:payload>ns1:VacationRequestProcessRequest>
ns1:creator.
wherens1isthenamespaceforthisexampleyournamespacemaybedifferent.
23.ClickInsertintoExpression.
TheExpressionBuilderdialogdisplaystheXPathexpressionintheExpressionsection.Figure318
(#BABCGIAB)providesdetails.
Figure318XPathExpression
Descriptionof"Figure318XPathExpression"(img_text/bp_ht_vacreq8.htm)
24.ClickOKtoexittheExpressionBuilderdialog.
25.ClickOKtoexittheAddParticipantTypedialog.
26.FromtheFilemenu,selectSaveAll.
31.6AssociatingtheHumanTaskandBPELProcess
ServiceComponents
YouarenowreadytoassociateyourhumantaskwiththeBPELprocessyoucreatedinSection31.3,"Creating
anApplicationandaProjectwithaBPELProcess."(#BABGBIAA)
ToassociatethehumantaskandBPELprocessservicecomponent:
1.IntheApplicationNavigator,doubleclickcomposite.xml.
2.DoubleclicktheVacationRequestProcessBPELprocessservicecomponentintheSOAComposite
Editor.
TheBPELprocessdisplaysinOracleBPELDesigner.
3.IntheComponentPalette,expandSOAComponents.
4.DragaHumanTaskbeneaththereceiveInputreceiveactivity.
5.Doubleclicktheactivity.
TheHumanTaskdialogappears.
6.FromtheTaskDefinitionlist,selecttheVacationRequestTasktaskyoucreated(ifitisnotcurrently
displaying).
ThedialogrefreshesasshowninFigure319(#BABHADDB)todisplayadditionalfields.
Figure319HumanTaskDialog
Descriptionof"Figure319HumanTaskDialog"(img_text/bp_ht_vacreq10.htm)
7.IntheBPELVariablecolumn,clicktheBrowseicon(dots)showninFigure3110(#BABBBDIA).
Figure3110BPELVariableEntry
Descriptionof"Figure3110BPELVariableEntry"(img_text/bp_ht_vacreq11.htm)
TheTaskParametersdialogappears.
8.FromtheTypelist,selectVariable.
9.ExpandProcess>Variables>inputVariable>payload>ns1:VacationRequestProcessRequest.
Figure3111(#BABFIDHF)providesdetails.
Figure3111VariableSelection
Descriptionof"Figure3111VariableSelection"(img_text/bp_ht_vacreq12.htm)
10.ClickOK.
Whencomplete,thedialoglooksasshowninFigure3112(#BABHHIBC):
Figure3112BPELVariable
Descriptionof"Figure3112BPELVariable"(img_text/bp_ht_vacreq13.htm)
11. ClickOKtoclosetheHumanTaskdialog.
ThehumantaskactivityappearsasshowninFigure3113(#BABHGAGB).
Figure3113HumanTaskandPartnerLinksinOracleBPELDesigner
Descriptionof"Figure3113HumanTaskandPartnerLinksinOracleBPELDesigner"(img_text/bp_ht_vacreq14.htm)
12.ReturntotheSOACompositeEditorandnotethattheBPELprocessandhumantaskservice
componentshavebeenautomaticallyconnected.Figure3114(#BABGADFH)providesdetails.
Figure3114SOACompositeEditor
Descriptionof"Figure3114SOACompositeEditor"(img_text/bp_ht_vacreq15.htm)
13.FromtheFilemenu,selectSaveAll.
31.7CreatinganApplicationServerConnection
YouarenowreadytocreateaconnectiontotheapplicationserveronwhichOracleSOASuiteisinstalledand
configuredwiththeSOAInfrastructure.TheseinstructionsdescribehowtocreateaconnectiontoOracle
WebLogicServer.ForinformationaboutcreatingaconnectiontootherapplicationserverssuchasIBM
WebSphereServer,seeOracleFusionMiddlewareThirdPartyApplicationServerGuide
(http://www.oracle.com/pls/topic/lookup?ctx=as111190&id=THIRD4001).
Tocreateanapplicationserverconnection
1.FromtheFilemainmenu,selectNew>Connections>ApplicationServerConnection.
2.ClickOK.
3.IntheConnectionNamefield,enteraconnectionname.
4.FromtheConnectionTypelist,selectWebLogic10.3.
5.ClickNext.
6.IntheUsernamefield,enterweblogic.
7.InthePasswordfield,enterthepasswordforconnectingtotheapplicationserver.
8.ClickNext.
9.EnterthehostnamefortheapplicationserverthatisconfiguredwiththeSOAInfrastructure.
10.IntheWeblogicDomainfield,entertheOracleWebLogicServerdomain.
11. ClickNext.
12.ClickTestConnection.
Ifsuccessful,themessageshowninFigure3115(#BABDBEGI)isdisplayed.
Figure3115ConnectionSuccess
Descriptionof"Figure3115ConnectionSuccess"(img_text/bp_ht_vacreq16.htm)
13.ClickFinish.
14.FromtheFilemenu,selectSaveAll.
31.8DeployingtheSOACompositeApplication
Youarenowreadytodeploytotheapplicationserveronwhichyoucreatedtheconnection.
TodeploytheSOAcompositeapplication
1.IntheApplicationNavigator,rightclicktheVacationRequestprojectandselectDeploy>
VacationRequest.
2.Followthepagesofthedeploymentwizardtodeploytheproject.
Theprojectisdeployed.
Formoreinformationaboutdeployment,seeSection43.7,"DeployingSOACompositeApplications."
(sca_lifecycle.htm#CHDBAJIB)
31.9InitiatingtheProcessInstance
Toinitiatetheprocessinstance:
1.SeeOracleFusionMiddlewareAdministrator'sGuideforOracleSOASuiteandOracleBusinessProcess
ManagementSuite(../../soasuite/bpmadminister/toc.htm)forinstructionsonaccessingtheTestWebService
pageforinitiatingtheprocessinstance.
31.10CreatingaTaskFormProject
Youarenowreadytocreateaprojectforthetaskform.Thisisaseparateprojectfromtheoneinwhichyou
createdthehumantask.
Tocreateataskformproject:
1.DoubleclicktheVacationRequestTaskhumantask.
TheHumanTaskEditorisdisplayed.
2.FromtheCreateFormmenuatthetop,selectAutoGenerateTaskForm.Figure3116(#BABJAGGH)
providesdetails.
Figure3116TaskFormCreation
Descriptionof"Figure3116TaskFormCreation"(img_text/bp_ht_vacreqdeploy.htm)
TheCreateProjectdialogappears.
3.IntheProjectNamefield,enterVacationRequestTaskFlow,andclickOK.
4.FromtheFilemainmenu,selectSaveAll.
31.11ActingontheTaskinOracleBPMWorklist
ToresolvethetaskinOracleBPMWorklist:
1.GotoOracleBPMWorklist:
http://hostname:7001/integration/worklistapp
2.LogintoOracleBPMWorklist.
3.Resolvethetask.
31.12DeployingtheTaskForm
Todeploythetaskform:
1.IntheApplicationNavigator,rightclicktheVacationRequestTaskFlowprojectandselectDeploy>
VacationRequestTaskFlow.
2.Followthepagesofthedeploymentwizardtodeploythetaskform.
Thetaskformisdeployed.
Formoreinformationaboutdeployment,seeSection43.7,"DeployingSOACompositeApplications."
(sca_lifecycle.htm#CHDBAJIB)
3.ReturntoOracleBPMWorklist.
4.NotethatthetaskformnowappearsatthebottomofOracleBPMWorklist.
31.13AdditionalTutorials
Inadditiontothevacationrequestusecase,othertutorialsareavailablefromtheOracleSOASuitesamples
(http://www.oracle.com/pls/topic/lookup?ctx=as111190&id=soasamples).
Table312(#BABHGCGB)providesanoverviewofsomesamples.Allsamplesshowtheuseofworklist
applicationsandworkflownotifications.Forthecompletelistofsamples,visittheURL.
Table312EndtoEndExamples
Sample
Description
Name
DemoCommunitySeed
Application
Performsdemocommunity
seeding.Thisisaprerequisitefor
allotherworkflowsamples.
workflow001
DemoCommunitySeedApp
VacationRequest
Providesasampleinwhichauser
submitsavacationrequestthat
getsassignedtotheirmanager
forapprovalorrejection.This
samplealsodescribeshowto
createOracleADFtaskformsfor
thevacationrequesttoactonthe
task.
workflow100VacationRequest
SalesQuoteRequest
Providesacomplexworkflow
samplewithchainingofmultiple
tasks.
workflow102SalesQuote
ContractApproval
Providesasampleofapprovinga
contract.Thissampleusesdigital
signaturesfortasks.
workflow104ContractApproval
IterativeDesign
Providesasampleinwhicha
workflowtaskcanbepassed
multipletimesbetweenassignees
duringthedesignprocess.
Advancedroutingrulesimplement
theroutingbehavior.
workflow106IterativeDesign
WorkflowCustomizations
Demonstrateshowtodeploy
customizationstoworkflow
serviceAPIs,suchascustom
resourcestringsfortask
attributes,viewnames,andso
on.
workflow110
workflowCustomizations
MLSSample
Demonstratesthesettingupofa
taskwithmultipletranslationsfor
thetasktitle.
workflow114MLSSample
WorkflowEventCallback
Demonstratestheuseofthe
workfloweventcallback.Workflow
eventsgeneratedbytasklifecycle
eventsareconsumedbyan
OracleMediator.
workflow116
WorkflowEventCallback
UserConfigDataMigrator
Movesuserconfigurations(views,
mappedattributes,andsoon)
fromoneinstancetoanother
throughanintermediateexport
file.
workflow117
UserConfigDataMigrator
JavaSamples
Providesanassortmentof
samplesthatuseJavatointeract
withhumanworkflow.
workflow118JavaSamples
ContactUs (http://www.oracle.com/us/corporate/contact/index.html)
TermsofUse(http://www.oracle.com/us/legal/terms/index.html)
(http://www.oracle.com/us/legal/privacy/index.html)
Copyright2015,Oracleand/oritsaffiliates.Allrightsreserved.
LegalNotices
YourPrivacyRights
AboutOracle(http://www.oracle.com/corporate/index.html)
(http://www.oracle.com/us/legal/index.html)
(#)