├── cf-insight-to-action-workflows-lp ├── LICENSE ├── NOTICE ├── images │ ├── solutionarchDiagram.png │ ├── userCentricWorkflow.png │ ├── systemCentricWorkflow.png │ ├── useractionvisibilityconfiguration.png │ └── systemCentricVisibilityConfiguration.png ├── Workflow Modules │ └── InsightToActionWorkflows.zip └── README.md ├── .vscode └── settings.json ├── collaboration-sample ├── appstartui │ ├── css │ │ └── style.css │ ├── model │ │ └── models.js │ ├── Component.js │ ├── index.html │ ├── i18n │ │ └── i18n.properties │ ├── configuration │ │ └── configuration.json │ └── manifest.json ├── usertasks │ ├── css │ │ └── style.css │ ├── i18n │ │ └── i18n.properties │ ├── model │ │ └── models.js │ ├── index.html │ ├── manifest.json │ └── controller │ │ └── approvals.controller.js ├── NOTICE.md ├── images │ ├── WorkflowModel.jpg │ ├── Solution-Diagram.png │ ├── startWorkflowUI.png │ ├── ConfigurationFile_1.jpg │ └── ConfigurationFile_2.jpg ├── AuditDocumentReview_ClickThrough.pdf ├── package.json ├── scripts │ └── DocumentAuditProcess │ │ ├── initializeApprovals.js │ │ ├── checkApprovalStatusLevel1.js │ │ └── SetApprovalStatus.js ├── .project ├── .che │ └── project.json ├── flp-config.json └── neo-app.json ├── cf-workflowstart-sample ├── taskui │ ├── webapp │ │ ├── css │ │ │ └── style.css │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── model │ │ │ └── models.js │ │ ├── index.html │ │ ├── controller │ │ │ └── app.controller.js │ │ └── manifest.json │ ├── package.json │ ├── ui5.yaml │ └── xs-app.json ├── startworkflow │ ├── webapp │ │ ├── css │ │ │ └── style.css │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── model │ │ │ ├── models.js │ │ │ └── StartPayload.json │ │ ├── index.html │ │ ├── Component.js │ │ ├── controller │ │ │ └── app.controller.js │ │ ├── manifest.json │ │ └── view │ │ │ └── app.view.xml │ ├── xs-app.json │ ├── package.json │ └── ui5.yaml ├── homepageflp │ └── portal-site │ │ ├── i18n │ │ ├── workflow.properties │ │ ├── defaultGroupId.properties │ │ └── defaultCatalogId.properties │ │ └── CommonDataModel.json ├── workflow-start-sample-approuter │ ├── xs-app.json │ └── package.json ├── resources │ └── workflow-start-sample.tar.zip ├── xs-security.json ├── package.json ├── mta.yaml └── approvals │ └── workflows │ └── capexapproval.workflow ├── onboarding-sample ├── taskui │ ├── approveEquip │ │ ├── css │ │ │ └── style.css │ │ ├── controller │ │ │ └── ApproveEquipment.controller.js │ │ ├── model │ │ │ └── models.js │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── index.html │ │ └── manifest.json │ ├── confirmEquip │ │ ├── css │ │ │ └── style.css │ │ ├── model │ │ │ ├── init.json │ │ │ └── models.js │ │ ├── index.html │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── manifest.json │ │ └── view │ │ │ └── NewEquipment.fragment.xml │ ├── acceptWorkplace │ │ ├── css │ │ │ └── style.css │ │ ├── controller │ │ │ └── AcceptWorkplace.controller.js │ │ ├── model │ │ │ └── models.js │ │ ├── index.html │ │ ├── i18n │ │ │ └── i18n.properties │ │ └── manifest.json │ ├── target │ │ └── onboarding.zip │ ├── package.json │ └── neo-app.json ├── NOTICE.md ├── images │ ├── Recipients.jpg │ ├── emailTask.jpg │ ├── workflow.jpg │ ├── Destination.jpg │ ├── getXSRFToken.jpg │ ├── acceptWorkplace.jpg │ ├── approveEquipment.jpg │ ├── confirmEquipment.jpg │ ├── modifyRecipients.jpg │ ├── rulesDestination.jpg │ ├── completedInstances.jpg │ ├── createWorkflowInstance.jpg │ ├── createWorkflowInstance_1.jpg │ └── onboardingSolutionDiagram.png ├── workflowmodel │ ├── SFSFOnboardingWorkflow │ │ ├── sample-data │ │ │ └── SuccessFactorsOnboarding │ │ │ │ └── InputPayload.json │ │ ├── scripts │ │ │ └── SuccessFactorsOnboarding │ │ │ │ ├── ProcessBuddyList.js │ │ │ │ ├── ConstructRulesPayload.js │ │ │ │ └── UpdateContext.js │ │ ├── webcontent │ │ │ └── SuccessFactorsOnboarding │ │ │ │ └── ReminderEmailTemplate.html │ │ └── .che │ │ │ └── project.json │ └── SFSFOnboardingWorkflow.zip └── CREDITS ├── cf-onboarding-sample ├── acceptWorkplace │ ├── webapp │ │ ├── css │ │ │ └── style.css │ │ ├── controller │ │ │ └── AcceptWorkplace.controller.js │ │ ├── model │ │ │ └── models.js │ │ ├── index.html │ │ ├── i18n │ │ │ └── i18n.properties │ │ └── manifest.json │ ├── package.json │ ├── xs-app.json │ └── Gruntfile.js ├── approveEquip │ ├── webapp │ │ ├── css │ │ │ └── style.css │ │ ├── controller │ │ │ └── ApproveEquipment.controller.js │ │ ├── model │ │ │ └── models.js │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── index.html │ │ └── manifest.json │ ├── package.json │ ├── xs-app.json │ └── Gruntfile.js ├── confirmEquip │ ├── webapp │ │ ├── css │ │ │ └── style.css │ │ ├── model │ │ │ ├── init.json │ │ │ └── models.js │ │ ├── index.html │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── manifest.json │ │ └── view │ │ │ └── NewEquipment.fragment.xml │ ├── package.json │ ├── xs-app.json │ └── Gruntfile.js ├── resources │ └── cf-onboarding-sample.zip ├── uiDeployer │ └── package.json ├── mta.yaml └── onboarding │ ├── scripts │ └── onboard │ │ ├── EnrichContext.js │ │ └── PrepareRulesPayload.js │ └── sample-data │ └── onboard │ └── SampleInputContext.json ├── cf-workflowmanagement-flp ├── WFMFLP │ ├── portal-site │ │ ├── i18n │ │ │ ├── workflow.properties │ │ │ ├── processvisibility.properties │ │ │ └── defaultCatalogId.properties │ │ ├── business-apps │ │ │ ├── business-rules.json │ │ │ └── ExpertViewAndCA.json │ │ └── CommonDataModel.json │ ├── xs-app.json │ └── package.json ├── WorkflowManagementFLP_appRouter │ ├── xs-app.json │ └── package.json ├── resources │ └── WorkflowManagementFLP.zip ├── xs-security.json ├── README.md └── mta.yaml ├── .gitignore ├── cf-aif-workflow-integration-sample ├── AIFDemoWorkflow.tar └── images │ ├── Edit_Mail.png │ ├── Edit_Mail2.png │ ├── SM59_Dest.png │ ├── User_Task.png │ ├── User_Task2.png │ ├── bgRFC_Dest.png │ ├── Launchpad_URL.png │ ├── SCP_Call_Log.png │ ├── Service_Key.png │ ├── WF_AIF_Link.png │ ├── oAuth_CLient.png │ ├── oAuth_Client2.png │ ├── Interface_Link.png │ ├── Role_Collection.png │ ├── Launchpad_Router.png │ ├── Mail_Destination.png │ ├── Workflow_Instance.png │ └── Project_Name_Launchpad.png ├── cf-documentcentricapprovalprocess-lp ├── images │ ├── taskUI.png │ ├── startUI.png │ ├── reworktask.png │ ├── documentWorkflow.jpg │ ├── fiorilaunchpad.png │ ├── mta.yaml.change.png │ ├── taskforwarding.png │ └── processvisibility.png ├── Process Visibility │ └── Visibility Document_Centric_Approval.zip ├── Workflow and SAP UI5 Modules │ └── Document Centric Approval Process.zip └── NOTICE ├── cf-outlook-integration-sample ├── order-spare-parts-process.zip ├── images │ └── SolutionArchitecture.png ├── mailserver ├── src │ └── main │ │ ├── webapp │ │ └── WEB-INF │ │ │ └── web.xml │ │ ├── resources │ │ ├── application.properties │ │ └── com │ │ │ └── sap │ │ │ └── bpm │ │ │ └── wfs │ │ │ └── forms │ │ │ └── adaptivecards │ │ │ └── transform.jslt │ │ └── java │ │ └── com │ │ └── sap │ │ └── bpm │ │ └── wfs │ │ └── forms │ │ └── adaptivecards │ │ ├── util │ │ ├── HttpUtils.java │ │ ├── Task.java │ │ └── UaaUtils.java │ │ ├── RemoteAccessException.java │ │ ├── Application.java │ │ ├── config │ │ ├── TaskSchedulerConfig.java │ │ ├── MailConfig.java │ │ └── VcapConfig.java │ │ ├── CardBuilder.java │ │ ├── cardvalidation │ │ └── OpenIdMetadata.java │ │ └── TaskRetriever.java ├── manifest.yml ├── NOTICE ├── README.md └── pom.xml ├── cf-purchase-requisition-approval-lp ├── images │ └── mta.yaml.changes.png ├── User Interface │ └── CustomUIForPurchaseRequisition.zip ├── Visibility Action Workflows │ └── PurchaseRequistionVisibilityActions.zip └── NOTICE ├── cf-capexapprovalprocess-sample ├── resources │ ├── SampleCapExApprovalVisibility.zip │ ├── samplecapexapprovalprocess_1.0.0.mtar │ ├── SampleCapitalExpenditureApprovalProcess.tar │ ├── SampleCapitalExpenditureApprovalRules.zip │ └── samplecapexapprovalprocess_1.0.2_Trial.mtar ├── CapEx │ ├── scripts │ │ ├── Approval │ │ │ ├── HandleRework.js │ │ │ ├── ProcessApprovalResult.js │ │ │ ├── PrepareApproval.js │ │ │ └── ProcessApproverDetails.js │ │ └── Initialization │ │ │ └── Initialization.js │ ├── sample-data │ │ └── Approval │ │ │ └── CapexSampleStartPayload.json │ ├── templates │ │ └── SampleCapitalExpenditureApprovalProcess.proctemplate │ └── workflows │ │ └── Initialization.workflow └── mta.yaml ├── cf-projectbudgetapproval-lp ├── Workflow and UIs │ └── ProjectBudgetApproval-Budget2105.zip ├── NOTICE └── README.md ├── .project ├── cf-vendoronboarding-lp ├── README.md └── NOTICE ├── cf-paymentdatachanges-lp ├── README.md └── NOTICE ├── cf-maintainpurchaseinforecord-lp ├── README.md └── NOTICE ├── cf-businesspartnercreation-lp ├── README.md └── NOTICE ├── cf-capitalexpenditure-lp ├── README.md └── NOTICE ├── cf-manageinvoiceswithoutpo-lp ├── README.md └── NOTICE ├── NOTICE └── .reuse └── dep5 /cf-insight-to-action-workflows-lp/LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/NOTICE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [] 3 | } -------------------------------------------------------------------------------- /collaboration-sample/appstartui/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /collaboration-sample/usertasks/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/i18n/workflow.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title = Workflow -------------------------------------------------------------------------------- /cf-workflowstart-sample/homepageflp/portal-site/i18n/workflow.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title = Workflow -------------------------------------------------------------------------------- /onboarding-sample/NOTICE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. -------------------------------------------------------------------------------- /collaboration-sample/NOTICE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/i18n/processvisibility.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title=Process Visibility -------------------------------------------------------------------------------- /cf-workflowstart-sample/homepageflp/portal-site/i18n/defaultGroupId.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title=Custom Applications -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/i18n/defaultCatalogId.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title = Default Catalog Title -------------------------------------------------------------------------------- /cf-workflowstart-sample/homepageflp/portal-site/i18n/defaultCatalogId.properties: -------------------------------------------------------------------------------- 1 | #XTIT 2 | title = Default Catalog Title -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore Eclipse project and settings files 2 | .classpath 3 | .settings 4 | 5 | # Ignore Mac files 6 | .DS_Store -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "authenticationMethod": "route", 3 | "welcomeFile": "/cp.portal" 4 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=app 3 | appDescription=App Description 4 | -------------------------------------------------------------------------------- /collaboration-sample/usertasks/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=AuditReviewProcess 3 | appDescription=App Description -------------------------------------------------------------------------------- /onboarding-sample/images/Recipients.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/Recipients.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/emailTask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/emailTask.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/workflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/workflow.jpg -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/sample-data/SuccessFactorsOnboarding/InputPayload.json: -------------------------------------------------------------------------------- 1 | { 2 | "userId": "cgrant1" 3 | } -------------------------------------------------------------------------------- /onboarding-sample/images/Destination.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/Destination.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/getXSRFToken.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/getXSRFToken.jpg -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WorkflowManagementFLP_appRouter/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/cp.portal", 3 | "authenticationMethod": "route" 4 | } -------------------------------------------------------------------------------- /onboarding-sample/images/acceptWorkplace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/acceptWorkplace.jpg -------------------------------------------------------------------------------- /collaboration-sample/images/WorkflowModel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/images/WorkflowModel.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/approveEquipment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/approveEquipment.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/confirmEquipment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/confirmEquipment.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/modifyRecipients.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/modifyRecipients.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/rulesDestination.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/rulesDestination.jpg -------------------------------------------------------------------------------- /onboarding-sample/taskui/target/onboarding.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/taskui/target/onboarding.zip -------------------------------------------------------------------------------- /collaboration-sample/images/Solution-Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/images/Solution-Diagram.png -------------------------------------------------------------------------------- /collaboration-sample/images/startWorkflowUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/images/startWorkflowUI.png -------------------------------------------------------------------------------- /onboarding-sample/images/completedInstances.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/completedInstances.jpg -------------------------------------------------------------------------------- /cf-workflowstart-sample/workflow-start-sample-approuter/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "authenticationMethod": "none", 3 | "routes": [], 4 | "welcomeFile": "/cp.portal" 5 | } -------------------------------------------------------------------------------- /collaboration-sample/images/ConfigurationFile_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/images/ConfigurationFile_1.jpg -------------------------------------------------------------------------------- /collaboration-sample/images/ConfigurationFile_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/images/ConfigurationFile_2.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/createWorkflowInstance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/createWorkflowInstance.jpg -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/AIFDemoWorkflow.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/AIFDemoWorkflow.tar -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/taskUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/taskUI.png -------------------------------------------------------------------------------- /onboarding-sample/images/createWorkflowInstance_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/createWorkflowInstance_1.jpg -------------------------------------------------------------------------------- /onboarding-sample/images/onboardingSolutionDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/images/onboardingSolutionDiagram.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Edit_Mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Edit_Mail.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Edit_Mail2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Edit_Mail2.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/SM59_Dest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/SM59_Dest.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/User_Task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/User_Task.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/User_Task2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/User_Task2.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/bgRFC_Dest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/bgRFC_Dest.png -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/startUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/startUI.png -------------------------------------------------------------------------------- /cf-onboarding-sample/resources/cf-onboarding-sample.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-onboarding-sample/resources/cf-onboarding-sample.zip -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=app 3 | appDescription=App Description 4 | createdOn = Created On 5 | description = Description 6 | -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Launchpad_URL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Launchpad_URL.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/SCP_Call_Log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/SCP_Call_Log.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Service_Key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Service_Key.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/WF_AIF_Link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/WF_AIF_Link.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/oAuth_CLient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/oAuth_CLient.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/oAuth_Client2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/oAuth_Client2.png -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/reworktask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/reworktask.png -------------------------------------------------------------------------------- /cf-outlook-integration-sample/order-spare-parts-process.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-outlook-integration-sample/order-spare-parts-process.zip -------------------------------------------------------------------------------- /collaboration-sample/AuditDocumentReview_ClickThrough.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/collaboration-sample/AuditDocumentReview_ClickThrough.pdf -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/onboarding-sample/workflowmodel/SFSFOnboardingWorkflow.zip -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Interface_Link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Interface_Link.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Role_Collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Role_Collection.png -------------------------------------------------------------------------------- /cf-outlook-integration-sample/images/SolutionArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-outlook-integration-sample/images/SolutionArchitecture.png -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/resources/WorkflowManagementFLP.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-workflowmanagement-flp/resources/WorkflowManagementFLP.zip -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Launchpad_Router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Launchpad_Router.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Mail_Destination.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Mail_Destination.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Workflow_Instance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Workflow_Instance.png -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/documentWorkflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/documentWorkflow.jpg -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/fiorilaunchpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/fiorilaunchpad.png -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/mta.yaml.change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/mta.yaml.change.png -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/taskforwarding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/taskforwarding.png -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/images/solutionarchDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/images/solutionarchDiagram.png -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/images/userCentricWorkflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/images/userCentricWorkflow.png -------------------------------------------------------------------------------- /cf-purchase-requisition-approval-lp/images/mta.yaml.changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-purchase-requisition-approval-lp/images/mta.yaml.changes.png -------------------------------------------------------------------------------- /cf-workflowstart-sample/resources/workflow-start-sample.tar.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-workflowstart-sample/resources/workflow-start-sample.tar.zip -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/images/processvisibility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/images/processvisibility.png -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/images/systemCentricWorkflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/images/systemCentricWorkflow.png -------------------------------------------------------------------------------- /cf-aif-workflow-integration-sample/images/Project_Name_Launchpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-aif-workflow-integration-sample/images/Project_Name_Launchpad.png -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/resources/SampleCapExApprovalVisibility.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-capexapprovalprocess-sample/resources/SampleCapExApprovalVisibility.zip -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/model/init.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProdDesc": "", 3 | "RequestedLoc": "", 4 | "Price":"", 5 | "EquipmentType":"", 6 | "ProductID":"", 7 | "ExpectedDate":"", 8 | "Currency":"EUR" 9 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/model/init.json: -------------------------------------------------------------------------------- 1 | { 2 | "ProdDesc": "", 3 | "RequestedLoc": "", 4 | "Price": "", 5 | "EquipmentType": "", 6 | "ProductID": "", 7 | "ExpectedDate": "", 8 | "Currency": "EUR" 9 | } -------------------------------------------------------------------------------- /cf-outlook-integration-sample/mailserver: -------------------------------------------------------------------------------- 1 | #mail.password=<< Existing password/certificate removed on export >> 2 | # 3 | #Thu Apr 02 09:48:39 UTC 2020 4 | Name=mailserver 5 | Type=MAIL 6 | mail.user=my-email@server.com 7 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/resources/samplecapexapprovalprocess_1.0.0.mtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-capexapprovalprocess-sample/resources/samplecapexapprovalprocess_1.0.0.mtar -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/Workflow Modules/InsightToActionWorkflows.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/Workflow Modules/InsightToActionWorkflows.zip -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/images/useractionvisibilityconfiguration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/images/useractionvisibilityconfiguration.png -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/images/systemCentricVisibilityConfiguration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-insight-to-action-workflows-lp/images/systemCentricVisibilityConfiguration.png -------------------------------------------------------------------------------- /cf-projectbudgetapproval-lp/Workflow and UIs/ProjectBudgetApproval-Budget2105.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-projectbudgetapproval-lp/Workflow and UIs/ProjectBudgetApproval-Budget2105.zip -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/resources/SampleCapitalExpenditureApprovalProcess.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-capexapprovalprocess-sample/resources/SampleCapitalExpenditureApprovalProcess.tar -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/resources/SampleCapitalExpenditureApprovalRules.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-capexapprovalprocess-sample/resources/SampleCapitalExpenditureApprovalRules.zip -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/resources/samplecapexapprovalprocess_1.0.2_Trial.mtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-capexapprovalprocess-sample/resources/samplecapexapprovalprocess_1.0.2_Trial.mtar -------------------------------------------------------------------------------- /cf-purchase-requisition-approval-lp/User Interface/CustomUIForPurchaseRequisition.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-purchase-requisition-approval-lp/User Interface/CustomUIForPurchaseRequisition.zip -------------------------------------------------------------------------------- /onboarding-sample/taskui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "onboarding", 3 | "version": "0.0.1", 4 | "description": "", 5 | "private": true, 6 | "devDependencies": { 7 | "@sap/grunt-sapui5-bestpractice-build": "^1.3.17" 8 | } 9 | } -------------------------------------------------------------------------------- /collaboration-sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DocumentAuditProcess", 3 | "version": "0.0.1", 4 | "description": "", 5 | "private": true, 6 | "devDependencies": { 7 | "@sap/grunt-sapui5-bestpractice-build": "1.3.33" 8 | } 9 | } -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/Process Visibility/Visibility Document_Centric_Approval.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/Process Visibility/Visibility Document_Centric_Approval.zip -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/Workflow and SAP UI5 Modules/Document Centric Approval Process.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-documentcentricapprovalprocess-lp/Workflow and SAP UI5 Modules/Document Centric Approval Process.zip -------------------------------------------------------------------------------- /cf-purchase-requisition-approval-lp/Visibility Action Workflows/PurchaseRequistionVisibilityActions.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-archive/cloud-workflow-samples/HEAD/cf-purchase-requisition-approval-lp/Visibility Action Workflows/PurchaseRequistionVisibilityActions.zip -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | cloud-workflow-samples 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/controller/AcceptWorkplace.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/core/mvc/Controller" 2 | ], function(Controller) { 3 | "use strict"; 4 | 5 | return Controller.extend("com.sap.cloud.workflow.samples.onbaccept.controller.AcceptWorkplace", { 6 | 7 | }); 8 | }); -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/controller/ApproveEquipment.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/core/mvc/Controller" 2 | ], function(Controller) { 3 | "use strict"; 4 | 5 | return Controller.extend("com.sap.cloud.workflow.samples.onbapprove.controller.ApproveEquipment", { 6 | 7 | }); 8 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/controller/AcceptWorkplace.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/core/mvc/Controller"], function (Controller) { 2 | "use strict"; 3 | 4 | return Controller.extend("com.sap.cloud.workflow.samples.onboardaccept.controller.AcceptWorkplace", { 5 | 6 | }); 7 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/controller/ApproveEquipment.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/core/mvc/Controller"], function (Controller) { 2 | "use strict"; 3 | 4 | return Controller.extend("com.sap.cloud.workflow.samples.onboardapprove.controller.ApproveEquipment", { 5 | 6 | }); 7 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/uiDeployer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UIDeployer", 3 | "engines": { 4 | "node": ">=6.0.0" 5 | }, 6 | "dependencies": { 7 | "@sap/html5-app-deployer": "2.0.0" 8 | }, 9 | "scripts": { 10 | "start": "node node_modules/@sap/html5-app-deployer/index.js" 11 | } 12 | } -------------------------------------------------------------------------------- /cf-vendoronboarding-lp/README.md: -------------------------------------------------------------------------------- 1 | # Vendor Onboarding Process Content Package 2 | 3 | This package including sources has been made available at https://api.sap.com/package/vendoronboarding. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /cf-paymentdatachanges-lp/README.md: -------------------------------------------------------------------------------- 1 | # Payment Data Changes 2 | 3 | This package including sources has been made available at https://api.sap.com/package/businesspartnerpaymentdatachangeapproval. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /cf-maintainpurchaseinforecord-lp/README.md: -------------------------------------------------------------------------------- 1 | # Maintain Purchase Info Record 2 | 3 | This package including sources has been made available at https://api.sap.com/package/maintainpurchaseinforecord. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "approveequip", 3 | "description": "", 4 | "devDependencies": { 5 | "@sap/grunt-sapui5-bestpractice-build": "1.3.65", 6 | "@sap/grunt-sapui5-bestpractice-test": "2.0.1" 7 | }, 8 | "scripts": { 9 | "test": "grunt unit_and_integration_tests" 10 | } 11 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "confirmequip", 3 | "description": "", 4 | "devDependencies": { 5 | "@sap/grunt-sapui5-bestpractice-build": "1.3.65", 6 | "@sap/grunt-sapui5-bestpractice-test": "2.0.1" 7 | }, 8 | "scripts": { 9 | "test": "grunt unit_and_integration_tests" 10 | } 11 | } -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/scripts/SuccessFactorsOnboarding/ProcessBuddyList.js: -------------------------------------------------------------------------------- 1 | var team = $.context.empData.team.d.directReports.results; 2 | var buddies = []; 3 | 4 | for (var i = 0; i < team.length; i++) { 5 | buddies.push(team[i].userId); 6 | } 7 | 8 | $.context.empData.buddies = buddies.toString(); -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acceptworkplace", 3 | "description": "", 4 | "devDependencies": { 5 | "@sap/grunt-sapui5-bestpractice-build": "1.3.65", 6 | "@sap/grunt-sapui5-bestpractice-test": "2.0.1" 7 | }, 8 | "scripts": { 9 | "test": "grunt unit_and_integration_tests" 10 | } 11 | } -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /cf-businesspartnercreation-lp/README.md: -------------------------------------------------------------------------------- 1 | # Business Partner Creation Approval Process using SAP Workflow Management 2 | 3 | This package including sources has been made available at https://api.sap.com/package/businesspartnercreationapprovalprocess. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/scripts/Approval/HandleRework.js: -------------------------------------------------------------------------------- 1 | $.context.internal.step.isReapproval = true; 2 | 3 | var decision = { 4 | "Id": $.usertasks.usertask2.last.processor, 5 | "Role": "Requester", 6 | "Decision": "Reworked", 7 | "Comments": $.context.comments 8 | }; 9 | 10 | $.context.History.push(decision); 11 | $.context.comments = ""; -------------------------------------------------------------------------------- /cf-capitalexpenditure-lp/README.md: -------------------------------------------------------------------------------- 1 | # Capital Expenditure Approval Process using SAP Business Technology Platform Workflow Management 2 | 3 | This package including sources has been made available at https://api.sap.com/package/sapcapitalexpenditureapprovalprocess. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /collaboration-sample/usertasks/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-manageinvoiceswithoutpo-lp/README.md: -------------------------------------------------------------------------------- 1 | # Custom Task UIs and Header Workflow for Manage Invoices without Purchase Order Live Process 2 | 3 | The sources has been made available along with the package at https://api.sap.com/package/lpp.sap.com.manageinvoiceswithoutpurchaseorder. Once the package is imported into the SAP BTP tenant, the sources can be accessed from the Manage Packages app. 4 | -------------------------------------------------------------------------------- /collaboration-sample/appstartui/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function (JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function () { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function(JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function() { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function (JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function () { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function (JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function () { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function (JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function () { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/model/models.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/model/json/JSONModel", 3 | "sap/ui/Device" 4 | ], function (JSONModel, Device) { 5 | "use strict"; 6 | 7 | return { 8 | 9 | createDeviceModel: function () { 10 | var oModel = new JSONModel(Device); 11 | oModel.setDefaultBindingMode("OneWay"); 12 | return oModel; 13 | } 14 | 15 | }; 16 | }); -------------------------------------------------------------------------------- /collaboration-sample/scripts/DocumentAuditProcess/initializeApprovals.js: -------------------------------------------------------------------------------- 1 | $.context.Document.Reviewers.Tax.ApprovalStatusText = "Pending"; 2 | $.context.Document.Reviewers.Accounting.ApprovalStatusText = "Pending"; 3 | $.context.Document.Reviewers.HeadOfBA.ApprovalStatusText = "Pending"; 4 | $.context.Document.Reviewers.ExternalAuditors.ApprovalStatusText = "Pending"; 5 | 6 | $.context.Document.Status = "Draft"; -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WorkflowManagementFLP_appRouter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "html5-apps-approuter", 3 | "description": "Node.js based application router service for html5-apps", 4 | "engines": { 5 | "node": "^8.0.0 || ^10.0.0" 6 | }, 7 | "dependencies": { 8 | "@sap/approuter": "6.0.1" 9 | }, 10 | "scripts": { 11 | "start": "node node_modules/@sap/approuter/approuter.js" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /cf-onboarding-sample/mta.yaml: -------------------------------------------------------------------------------- 1 | ID: sample.onboarding.mta 2 | _schema-version: '2.1' 3 | parameters: 4 | deploy_mode: html5-repo 5 | version: 0.0.1 6 | modules: 7 | - name: onboarding 8 | type: com.sap.application.content 9 | path: onboarding 10 | requires: 11 | - name: wm_workflow 12 | parameters: 13 | content-target: true 14 | resources: 15 | - name: wm_workflow 16 | type: org.cloudfoundry.existing-service 17 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/xs-security.json: -------------------------------------------------------------------------------- 1 | { 2 | "xsappname":"workflowstartform", 3 | "tenant-mode": "dedicated", 4 | "description": "Security profile of called application", 5 | "scopes": [ 6 | { 7 | "name": "uaa.user", 8 | "description": "UAA" 9 | } 10 | ], 11 | "role-templates": [ 12 | { 13 | "name": "Token_Exchange", 14 | "description": "UAA", 15 | "scope-references": [ 16 | "uaa.user" 17 | ] 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "engines": { 3 | "node": ">=8.0.0" 4 | }, 5 | "name": "site-content", 6 | "version": "3.17.0", 7 | "description": "portal site content deployer package", 8 | "license": "Apache-2.0", 9 | "author": "Portal Team", 10 | "dependencies": { 11 | "@sap/portal-cf-content-deployer": "3.18.0-20190911111653" 12 | }, 13 | "scripts": { 14 | "start": "node --harmony node_modules/@sap/portal-cf-content-deployer/src/index.js" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /collaboration-sample/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | sample.collaboration 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.validation.validationbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.wst.jsdt.core.jsNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/scripts/SuccessFactorsOnboarding/ConstructRulesPayload.js: -------------------------------------------------------------------------------- 1 | var employee = {}; 2 | 3 | var empJob = $.context.empData.d.results[0].empInfo.jobInfoNav.results[0]; 4 | 5 | employee.__type__= "Employee"; 6 | employee.isFulltimeEmployee = empJob.isFulltimeEmployee; 7 | employee.countryOfCompany = empJob.countryOfCompany; 8 | employee.company = empJob.company; 9 | employee.jobTitle = empJob.jobTitle; 10 | 11 | $.context.empData.Employee = employee; -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/mta.yaml: -------------------------------------------------------------------------------- 1 | _schema-version: "3.2" 2 | ID: SampleCapitalExpenditureApprovalProcess 3 | version: 0.0.1 4 | modules: 5 | - name: CapEx 6 | type: com.sap.application.content 7 | path: CapEx 8 | requires: 9 | - name: wm_workflow 10 | parameters: 11 | content-target: true 12 | resources: 13 | - name: wm_workflow 14 | parameters: 15 | service-plan: standard 16 | service: workflow 17 | type: org.cloudfoundry.existing-service 18 | -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/xs-security.json: -------------------------------------------------------------------------------- 1 | { 2 | "xsappname":"workflowmanagement", 3 | "tenant-mode": "dedicated", 4 | "description": "Security profile of called application", 5 | "scopes": [ 6 | { 7 | "name": "uaa.user", 8 | "description": "UAA" 9 | } 10 | ], 11 | "role-templates": [ 12 | { 13 | "name": "Token_Exchange", 14 | "description": "UAA", 15 | "scope-references": [ 16 | "uaa.user" 17 | ] 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | card.submission.url=https://--wfs-forms-adaptive-cards.cfapps..hana.ondemand.com 2 | 3 | mail.smtp.host= 4 | mail.smtp.port=587 5 | mail.smtp.auth=true 6 | mail.smtp.starttls.enable=true 7 | mail.smtp.connectiontimeout=5000 8 | mail.smtp.timeout=5000 9 | 10 | mail.destination=mailserver 11 | 12 | organization.id= 13 | 14 | originator.id= 15 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "workflow-start-sample", 3 | "version": "0.0.1", 4 | "devDependencies": { 5 | "@sap/ui5-builder-webide-extension": "1.0.x", 6 | "@ui5/cli": "2.2.6", 7 | "eslint": "5.16.x", 8 | "@sap/eslint-plugin-ui5-jsdocs": "2.0.x", 9 | "@sapui5/ts-types": "1.71.x", 10 | "bestzip": "2.1.7", 11 | "rimraf": "3.0.2" 12 | }, 13 | "ui5": { 14 | "dependencies": [ 15 | "@sap/ui5-builder-webide-extension" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /collaboration-sample/scripts/DocumentAuditProcess/checkApprovalStatusLevel1.js: -------------------------------------------------------------------------------- 1 | $.context.Document.levelOneStatus = $.context.Document.Reviewers.HeadOfBA.ApprovalStatus 2 | && $.context.Document.Reviewers.ExternalAuditors.ApprovalStatus 3 | && $.context.Document.Reviewers.Accounting.ApprovalStatus 4 | && $.context.Document.Reviewers.Tax.ApprovalStatus; 5 | 6 | if ($.context.Document.levelOneStatus === true){ 7 | $.context.Document.Status = "Functional Review Completed"; 8 | } 9 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/scripts/Initialization/Initialization.js: -------------------------------------------------------------------------------- 1 | var isRestarted = $.context.isRestarted ? true : false; 2 | $.context.isRestarted = isRestarted; 3 | if (!isRestarted) { 4 | $.context.createdDate = new Date().toISOString(); 5 | $.context.History = []; 6 | } 7 | 8 | $.context.workflowTerminated = false; 9 | $.context.internal = { 10 | approvalStatus: "Running", 11 | workflowTerminated: false, 12 | mail: {}, 13 | step: { 14 | isReapproval: false, 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/index.html", 3 | "authenticationMethod": "none", 4 | "logout": { 5 | "logoutEndpoint": "/do/logout" 6 | }, 7 | "routes": [{ 8 | "source": "^/bpmworkflowruntime/(.*)$", 9 | "target": "/$1", 10 | "service": "com.sap.bpm.workflow", 11 | "endpoint": "workflow_rest_url", 12 | "authenticationType": "xsuaa" 13 | }, { 14 | "source": "^(.*)$", 15 | "target": "$1", 16 | "service": "html5-apps-repo-rt", 17 | "authenticationType": "xsuaa" 18 | }] 19 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/index.html", 3 | "authenticationMethod": "none", 4 | "logout": { 5 | "logoutEndpoint": "/do/logout" 6 | }, 7 | "routes": [{ 8 | "source": "^/bpmworkflowruntime/(.*)$", 9 | "target": "/$1", 10 | "service": "com.sap.bpm.workflow", 11 | "endpoint": "workflow_rest_url", 12 | "authenticationType": "xsuaa" 13 | }, { 14 | "source": "^(.*)$", 15 | "target": "$1", 16 | "service": "html5-apps-repo-rt", 17 | "authenticationType": "xsuaa" 18 | }] 19 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/index.html", 3 | "authenticationMethod": "none", 4 | "logout": { 5 | "logoutEndpoint": "/do/logout" 6 | }, 7 | "routes": [{ 8 | "source": "^/bpmworkflowruntime/(.*)$", 9 | "target": "/$1", 10 | "service": "com.sap.bpm.workflow", 11 | "endpoint": "workflow_rest_url", 12 | "authenticationType": "xsuaa" 13 | }, { 14 | "source": "^(.*)$", 15 | "target": "$1", 16 | "service": "html5-apps-repo-rt", 17 | "authenticationType": "xsuaa" 18 | }] 19 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/workflow-start-sample-approuter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "approuter", 3 | "description": "Node.js based application router service for html5-apps", 4 | "engines": { 5 | "node": "^8.0.0 || ^10.0.0" 6 | }, 7 | "dependencies": { 8 | "@sap/approuter": "8.1.x" 9 | }, 10 | "devDependencies": { 11 | "@sap/html5-repo-mock": "1.5.x" 12 | }, 13 | "scripts": { 14 | "start": "node node_modules/@sap/approuter/approuter.js", 15 | "start-local": "node node_modules/@sap/html5-repo-mock/index.js" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/webcontent/SuccessFactorsOnboarding/ReminderEmailTemplate.html: -------------------------------------------------------------------------------- 1 |

Dear Task Owner,

2 |

Task Due date of confirm or change equipment for the new hire ${context.userId} has exceeded.

3 |

Please confirm or change equipment for the new hire ${context.userId}.

4 |

Access SAP My Inbox to claim and complete your task.

5 | 6 |


Thanks & best regards,

7 |

Workflow Notifications

8 | 9 |

This is a system generated email. Please do not reply.

-------------------------------------------------------------------------------- /collaboration-sample/scripts/DocumentAuditProcess/SetApprovalStatus.js: -------------------------------------------------------------------------------- 1 | $.context.Document.levelTwoStatus = $.context.Document.Approvers.ExternalAuditHeads.ApprovalStatus 2 | && $.context.Document.Approvers.HeadOfGroupReporting.ApprovalStatus; 3 | 4 | if ($.context.Document.levelTwoStatus === true) { 5 | $.context.Document.Status = "Final Sign-Off"; 6 | } 7 | 8 | // set business rules context 9 | $.context.WorkflowDetails = {}; 10 | $.context.WorkflowDetails.__type__ = "WorkflowDetails"; 11 | $.context.WorkflowDetails.definitionID = "auditreviewprocess"; 12 | $.context.WorkflowDetails.sequenceNumber = ""; -------------------------------------------------------------------------------- /onboarding-sample/taskui/neo-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/confirmEquip/index.html", 3 | "routes": [ 4 | { 5 | "path": "/resources", 6 | "target": { 7 | "type": "service", 8 | "name": "sapui5", 9 | "entryPath": "/resources" 10 | }, 11 | "description": "SAPUI5 Resources" 12 | }, 13 | { 14 | "path": "/test-resources", 15 | "target": { 16 | "type": "service", 17 | "name": "sapui5", 18 | "entryPath": "/test-resources" 19 | }, 20 | "description": "SAPUI5 Test Resources" 21 | } 22 | ], 23 | "sendWelcomeFileRedirect": true 24 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /*global module*/ 2 | module.exports = function (grunt) { 3 | "use strict"; 4 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-build"); 5 | grunt.config.merge({ 6 | compatVersion: "edge", 7 | deploy_mode: "html_repo" 8 | }); 9 | grunt.registerTask("default", [ 10 | "clean", 11 | "lint", 12 | "build" 13 | ]); 14 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-test"); 15 | grunt.registerTask("unit_and_integration_tests", ["test"]); 16 | grunt.config.merge({ 17 | coverage_threshold: { 18 | statements: 0, 19 | branches: 100, 20 | functions: 0, 21 | lines: 0 22 | } 23 | }); 24 | }; -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /*global module*/ 2 | module.exports = function (grunt) { 3 | "use strict"; 4 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-build"); 5 | grunt.config.merge({ 6 | compatVersion: "edge", 7 | deploy_mode: "html_repo" 8 | }); 9 | grunt.registerTask("default", [ 10 | "clean", 11 | "lint", 12 | "build" 13 | ]); 14 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-test"); 15 | grunt.registerTask("unit_and_integration_tests", ["test"]); 16 | grunt.config.merge({ 17 | coverage_threshold: { 18 | statements: 0, 19 | branches: 100, 20 | functions: 0, 21 | lines: 0 22 | } 23 | }); 24 | }; -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /*global module*/ 2 | module.exports = function (grunt) { 3 | "use strict"; 4 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-build"); 5 | grunt.config.merge({ 6 | compatVersion: "edge", 7 | deploy_mode: "html_repo" 8 | }); 9 | grunt.registerTask("default", [ 10 | "clean", 11 | "lint", 12 | "build" 13 | ]); 14 | grunt.loadNpmTasks("@sap/grunt-sapui5-bestpractice-test"); 15 | grunt.registerTask("unit_and_integration_tests", ["test"]); 16 | grunt.config.merge({ 17 | coverage_threshold: { 18 | statements: 0, 19 | branches: 100, 20 | functions: 0, 21 | lines: 0 22 | } 23 | }); 24 | }; -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/index.html", 3 | "authenticationMethod": "route", 4 | "logout": { 5 | "logoutEndpoint": "/do/logout" 6 | }, 7 | "routes": [ 8 | { 9 | "source": "^/bpmworkflowruntime/(.*)$", 10 | "target": "/$1", 11 | "service": "com.sap.bpm.workflow", 12 | "endpoint": "workflow_rest_url", 13 | "authenticationType": "xsuaa" 14 | }, 15 | { 16 | "source": "^(.*)$", 17 | "target": "$1", 18 | "service": "html5-apps-repo-rt", 19 | "authenticationType": "xsuaa" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "taskui", 3 | "version": "0.0.1", 4 | "devDependencies": { 5 | "@sapui5/ts-types": "1.71.x", 6 | "@ui5/cli": "2.2.6", 7 | "@sap/ui5-builder-webide-extension": "1.0.x", 8 | "bestzip": "2.1.7", 9 | "rimraf": "3.0.2" 10 | }, 11 | "scripts": { 12 | "build": "npm run clean && ui5 build --include-task=generateManifestBundle generateCachebusterInfo && npm run zip", 13 | "zip": "cd dist && npx bestzip ../taskui-content.zip *", 14 | "clean": "npx rimraf taskui-content.zip dist" 15 | }, 16 | "ui5": { 17 | "dependencies": [ 18 | "@sap/ui5-builder-webide-extension" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "startworkflow", 3 | "version": "0.0.1", 4 | "devDependencies": { 5 | "@sapui5/ts-types": "1.71.x", 6 | "@ui5/cli": "2.2.6", 7 | "@sap/ui5-builder-webide-extension": "1.0.x", 8 | "bestzip": "2.1.7", 9 | "rimraf": "3.0.2" 10 | }, 11 | "scripts": { 12 | "build": "npm run clean && ui5 build --include-task=generateManifestBundle generateCachebusterInfo && npm run zip", 13 | "zip": "cd dist && npx bestzip ../startworkflow-content.zip *", 14 | "clean": "npx rimraf startworkflow-content.zip dist" 15 | }, 16 | "ui5": { 17 | "dependencies": [ 18 | "@sap/ui5-builder-webide-extension" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/business-apps/business-rules.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "3.0", 3 | "identification": { 4 | "id": "sap.rule.manageprojects", 5 | "entityType": "businessapp" 6 | }, 7 | "payload": { 8 | "visualizations": { 9 | "BusinessRules-ManageRulesProjects": { 10 | "vizType": "sap.ushell.StaticAppLauncher", 11 | "vizConfig": { 12 | "sap.app": { 13 | "title": "Manage Rule Projects" 14 | }, 15 | "sap.flp": { 16 | "target": { 17 | "type": "URL", 18 | "url": "/comsapbpmrule.ruleeditor/" 19 | } 20 | }, 21 | "sap.ui": { 22 | "icons": { 23 | "icon": "sap-icon://suitcase" 24 | } 25 | } 26 | } 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /onboarding-sample/CREDITS: -------------------------------------------------------------------------------- 1 | This program references the following third party open source or other free download components. 2 | The third party licensors of these components may provide additional license rights, terms and conditions 3 | and/or require certain notices as described below. 4 | 5 | Json-simple (https://code.google.com/archive/p/json-simple) 6 | Licensed under Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Spring Framework (https://projects.spring.io/spring-framework/) 9 | Licensed under Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | API for SAP Cloud Platform (com.sap.cloud) 12 | Licensed under Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Confirm Equipment 2 | appTitle = Confirm Equipment 3 | appDescription=Buddy shall change or confirm equipment 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empID = User ID 10 | businessUnit = Business Unit 11 | department = Department 12 | costCenter = Cost Center 13 | firstName = First Name 14 | lastName = Last Name 15 | tableTitle = Equipment Needed 16 | equipType = Type 17 | equipDesc = Description 18 | equipReqLoc = Requested Location 19 | equipPrice = Price 20 | equip = Equipment 21 | status = Status 22 | statusValue = To be Approved 23 | noDataText = No equipments requested -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Confirm Equipment 2 | appTitle = Confirm Equipment 3 | appDescription=Buddy shall change or confirm equipment 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empID = User ID 10 | businessUnit = Business Unit 11 | department = Department 12 | costCenter = Cost Center 13 | firstName = First Name 14 | lastName = Last Name 15 | tableTitle = Equipment Needed 16 | equipType = Type 17 | equipDesc = Description 18 | equipReqLoc = Requested Location 19 | equipPrice = Price 20 | equip = Equipment 21 | status = Status 22 | statusValue = To be Approved 23 | noDataText = No equipments requested -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/model/StartPayload.json: -------------------------------------------------------------------------------- 1 | { 2 | "RequestId": "CAPEX_REQ_00_000", 3 | "Title": "Build mobile apps", 4 | "Requester": { 5 | "Name":"John Dilbert", 6 | "Email": "john.dilbert@saptest.com", 7 | "UserId":"P000000", 8 | "Comment":"Please approve the capital expenditure" 9 | }, 10 | "Investment": { 11 | "TotalCost": 10000, 12 | "Type": "Software", 13 | "CAPEX": 10000, 14 | "OPEX": 4000, 15 | "Division":"BPM", 16 | "ROI": 5, 17 | "Country": "Germany", 18 | "Currency": "EUR", 19 | "Description": "Provide a fresh experience for our customers by providing new apps for our services" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/scripts/Approval/ProcessApprovalResult.js: -------------------------------------------------------------------------------- 1 | var task = $.usertasks.usertask1.last; 2 | 3 | $.context.internal.step.lastDecision = task.decision; 4 | 5 | 6 | var decision = { 7 | "Id": task.processor, 8 | "Role": $.context.role, 9 | "Decision": task.decision, 10 | "Comments": $.context.comments 11 | }; 12 | $.context.lastComment = $.context.comments; 13 | $.context.lastApprover = task.processor; 14 | 15 | $.context.History.push(decision); 16 | $.context.comments = ""; 17 | 18 | 19 | if (task.decision == "rework") { 20 | $.context.internal.step.isReapproval = true; 21 | } else if (task.decision !== "approve") { 22 | $.context.internal.approvalStatus = "Rejected"; 23 | $.context.internal.workflowTerminated = true; 24 | } -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/.che/project.json: -------------------------------------------------------------------------------- 1 | {"type":"sap.web","builders":{"configs":{}},"runners":{"configs":{}},"attributes":{"sap.watt.common.setting":["{\"projectType\":[\"sap.bpm.webide.wfs.projectType.id\",\"sap.watt.uitools.ide.web\",\"sap.watt.uitools.ide.fiori\"],\"generation\":[{\"templateId\":\"sap.bpm.webide.wfs.template.plugin.configures.templates.basicWorkflowCommon\",\"templateVersion\":\"1.0.0\",\"dateTimeStamp\":\"Wed, 23 Aug 2017 06:00:17 GMT\"}],\"translation\":{\"translationDomain\":\"\",\"supportedLanguages\":\"en,fr,de\",\"defaultLanguage\":\"en\",\"defaultI18NPropertyFile\":\"i18n.properties\",\"resourceModelName\":\"i18n\"},\"basevalidator\":{\"services\":{\"xml\":\"xmlValidator\",\"js\":\"jsValidator\"}}}"]},"mixinTypes":[]} -------------------------------------------------------------------------------- /cf-outlook-integration-sample/manifest.yml: -------------------------------------------------------------------------------- 1 | --- 2 | applications: 3 | - name: --wfs-forms-adaptive-cards 4 | memory: 1G 5 | instances: 1 6 | path: target/wfs-forms-adaptive-cards-0.0.1-SNAPSHOT.war 7 | buildpack: sap_java_buildpack 8 | env: 9 | TARGET_RUNTIME: tomcat 10 | SET_LOGGING_LEVEL: '{com.sap.bpm.wfs: INFO}' 11 | LOG_REMOTE_USER: true 12 | JAVA_OPTS: "-Dcom.sun.management.jmxremote.authenticate=false 13 | -Dcom.sun.management.jmxremote.ssl=false 14 | -Dcom.sun.management.jmxremote.port=5000 15 | -Dcom.sun.management.jmxremote.rmi.port=5000 16 | -Djava.rmi.server.hostname='127.0.0.1' " 17 | timeout: 600 18 | services: 19 | - workflow-service 20 | - destination-service 21 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/sample-data/Approval/CapexSampleStartPayload.json: -------------------------------------------------------------------------------- 1 | { 2 | "RequestId": "CAPEX_REQ_001", 3 | "Title": "Build mobile apps", 4 | "Requester": { 5 | "Name":"", 6 | "UserId":"", 7 | "Comment":"Please Approve" 8 | }, 9 | "Investment": { 10 | "Type": "Software", 11 | "Description": "Provide a fresh experience for our customers by providing new apps for our services", 12 | "TotalCost": 15000, 13 | "CAPEX": 10000, 14 | "OPEX": 5000, 15 | "ROI": 5, 16 | "Currency": "EUR", 17 | "BusinessUnit": "Purchasing", 18 | "Country": "Germany" 19 | }, 20 | "approvalstep": "LocalManager", 21 | "History": null, 22 | "internal": null 23 | } 24 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/util/HttpUtils.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.util; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | 7 | import org.apache.http.HttpResponse; 8 | 9 | public class HttpUtils { 10 | 11 | /** 12 | * Retrieves the content of an HTTP response. Returns defaultContent as a fallback. 13 | */ 14 | public static InputStream getContent(HttpResponse response, String defaultContent) throws IOException { 15 | if (response == null || response.getEntity() == null) { 16 | return new ByteArrayInputStream(defaultContent.getBytes()); 17 | } 18 | 19 | return response.getEntity().getContent(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /onboarding-sample/workflowmodel/SFSFOnboardingWorkflow/scripts/SuccessFactorsOnboarding/UpdateContext.js: -------------------------------------------------------------------------------- 1 | var EquipmentInfo = $.context.equipment.EquipmentInfo; 2 | 3 | var EquipInfo = []; 4 | var equip = {}; 5 | 6 | if (EquipmentInfo.length >= 0 ) { 7 | for (var i = 0; i < EquipmentInfo.length; i++) { 8 | equip = EquipmentInfo[i]; 9 | equip.Status = "New"; 10 | equip.ExpectedDate = ""; 11 | equip.RequestedLoc = "Building 01"; 12 | EquipInfo.push(equip); 13 | } 14 | } else { 15 | if (typeof EquipmentInfo.ProductID !== "undefined"){ 16 | equip = EquipmentInfo; 17 | equip.Status = "New"; 18 | equip.ExpectedDate = ""; 19 | equip.RequestedLoc = "Building 01"; 20 | EquipInfo.push(equip); 21 | } 22 | } 23 | 24 | $.context.equipment.EquipmentsInfo = []; 25 | $.context.equipment.EquipmentsInfo = EquipInfo; -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | taskui 7 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/ui5.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '1.0' 2 | metadata: 3 | name: taskui 4 | type: application 5 | resources: 6 | configuration: 7 | propertiesFileSourceEncoding: UTF-8 8 | builder: 9 | resources: 10 | excludes: 11 | - "/test/**" 12 | - "/localService/**" 13 | customTasks: 14 | - name: webide-extension-task-updateManifestJson 15 | afterTask: generateVersionInfo 16 | configuration: 17 | appFolder: webapp 18 | destDir: dist 19 | - name: webide-extension-task-resources 20 | afterTask: webide-extension-task-updateManifestJson 21 | configuration: 22 | nameSpace: sap/demo/bpm 23 | - name: webide-extension-task-copyFile 24 | afterTask: webide-extension-task-resources 25 | configuration: 26 | srcFile: "/xs-app.json" 27 | destFile: "/xs-app.json" 28 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/ui5.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '1.0' 2 | metadata: 3 | name: startworkflow 4 | type: application 5 | resources: 6 | configuration: 7 | propertiesFileSourceEncoding: UTF-8 8 | builder: 9 | resources: 10 | excludes: 11 | - "/test/**" 12 | - "/localService/**" 13 | customTasks: 14 | - name: webide-extension-task-updateManifestJson 15 | afterTask: generateVersionInfo 16 | configuration: 17 | appFolder: webapp 18 | destDir: dist 19 | - name: webide-extension-task-resources 20 | afterTask: webide-extension-task-updateManifestJson 21 | configuration: 22 | nameSpace: sap/demo/bpm 23 | - name: webide-extension-task-copyFile 24 | afterTask: webide-extension-task-resources 25 | configuration: 26 | srcFile: "/xs-app.json" 27 | destFile: "/xs-app.json" 28 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Workflow Start Form 7 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/Component.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/UIComponent", 3 | "sap/ui/Device", 4 | "sap/demo/bpm/startworkflow/model/models" 5 | ], function (UIComponent, Device, models) { 6 | "use strict"; 7 | 8 | return UIComponent.extend("sap.demo.bpm.startworkflow.Component", { 9 | 10 | metadata: { 11 | manifest: "json" 12 | }, 13 | 14 | /** 15 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once. 16 | * @public 17 | * @override 18 | */ 19 | init: function () { 20 | // call the base component's init function 21 | UIComponent.prototype.init.apply(this, arguments); 22 | 23 | // enable routing 24 | this.getRouter().initialize(); 25 | 26 | // set the device model 27 | this.setModel(models.createDeviceModel(), "device"); 28 | } 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /collaboration-sample/appstartui/Component.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/UIComponent", 3 | "sap/ui/Device", 4 | "com/sap/cloud/workflow/samples/DocumentAuditProcess/model/models" 5 | ], function(UIComponent, Device, models) { 6 | "use strict"; 7 | 8 | return UIComponent.extend("com.sap.cloud.workflow.samples.DocumentAuditProcess.Component", { 9 | metadata: { 10 | manifest: "json" 11 | }, 12 | 13 | /** 14 | * The component is initialized by UI5 automatically during the startup of the app and calls the init method once. 15 | * @public 16 | * @override 17 | */ 18 | init: function() { 19 | // call the base component's init function 20 | UIComponent.prototype.init.apply(this, arguments); 21 | 22 | // enable routing 23 | this.getRouter().initialize(); 24 | 25 | // set the device model 26 | this.setModel(models.createDeviceModel(), "device"); 27 | } 28 | }); 29 | }); -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/scripts/Approval/PrepareApproval.js: -------------------------------------------------------------------------------- 1 | /************ Initialize the model, if not done ****************/ 2 | if($.context.approvalstep == null){ 3 | $.context.approvalstep = "LocalManager", 4 | $.context.History = []; 5 | $.context.internal = {}; 6 | $.context.internal.step = {}; 7 | } 8 | 9 | /************ Prepare Input Payload to Execute Rules ****************/ 10 | var details = { 11 | "ApprovalStep": $.context.approvalstep, 12 | "BusinessUnit": $.context.Investment.BusinessUnit, 13 | "Country": $.context.Investment.Country, 14 | "Type": $.context.Investment.Type, 15 | "TotalCost": $.context.Investment.TotalCost 16 | }; 17 | 18 | var rulesPayload = { 19 | "RuleServiceId": "a37df8246b2048dfba6f07c46e6ed25f", 20 | "RuleServiceRevision": "Trial", 21 | "Vocabulary": [ { "Investment": details } ] 22 | }; 23 | 24 | $.context.internal.rulesPayload = rulesPayload; 25 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-outlook-integration-sample/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2020 SAP SE or an SAP affiliate company. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /collaboration-sample/usertasks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | AuditReviewProcess 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-onboarding-sample/onboarding/scripts/onboard/EnrichContext.js: -------------------------------------------------------------------------------- 1 | var EquipmentInfo = $.context.equipment.EquipmentsInfo.Result[0].EquipmentList; 2 | var EquipInfo = []; 3 | var equip = {}; 4 | if (EquipmentInfo.length > 0) { 5 | for (var i = 0; i < EquipmentInfo.length; i++) { 6 | equip = EquipmentInfo[i]; 7 | equip.ProdDesc = equip.ProductDesc; 8 | equip.Status = "New"; 9 | equip.ExpectedDate = ""; 10 | equip.RequestedLoc = "Building 01"; 11 | equip.CostCenter = $.context.empData.d.results[0].empInfo.jobInfoNav.results[0].costCenter; 12 | EquipInfo.push(equip); 13 | } 14 | }else { 15 | equip = EquipmentInfo; 16 | equip.ProdDesc = equip.ProductDesc; 17 | equip.Status = "New"; 18 | equip.ExpectedDate = ""; 19 | equip.RequestedLoc = "Building 01"; 20 | equip.CostCenter = $.context.empData.d.results[0].empInfo.jobInfoNav.results[0].costCenter; 21 | EquipInfo.push(equip); 22 | } 23 | $.context.equipment.EquipmentsInfo = EquipInfo; -------------------------------------------------------------------------------- /cf-projectbudgetapproval-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-projectbudgetapproval-lp/README.md: -------------------------------------------------------------------------------- 1 | # Project Budget Approval using SAP Business Technology Platform Workflow Management 2 | ## Overview 3 | The solution enables customers to accelerate the digitalization of their budget approval in a transparent way and provide flexibility to meet business requirements.Budget Approval Process enables customers to automate approvals or review of planned budget involving multiple business users from different organizations before posting the planned budget items into S/4 HANA. 4 | 5 | ## Pre-Requisites 6 | The following SAP Business Technology Platform services are required for this scenario: 7 | 8 | - SAP Business Application Studio 9 | - SAP Workflow management 10 | - SAP Cloud Portal / Launchpad Service 11 | - SAP Identity Authentication Service (optional) 12 | 13 | 14 | Please refer the setup and configuration guide available in [SAP API Business Hub](https://api.sap.com/package/com.sap.content.s4hanabudgetapproval?section=Overview). 15 | -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-capitalexpenditure-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-documentcentricapprovalprocess-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-paymentdatachanges-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-purchase-requisition-approval-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-vendoronboarding-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-businesspartnercreation-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. 16 | -------------------------------------------------------------------------------- /cf-manageinvoiceswithoutpo-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/business-apps/ExpertViewAndCA.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version":"3.0", 3 | "identification":{ 4 | "id":"cross.fnd.fiori.inbox", 5 | "entityType":"businessapp" 6 | }, 7 | "payload":{ 8 | "visualizations":{ 9 | "WorkflowTask-MyInboxWithSubstitution":{ 10 | "vizType":"sap.ushell.DynamicAppLauncher", 11 | "vizConfig":{ 12 | "sap.app":{ 13 | "title":"My Inbox", 14 | "description":"Manage Tasks", 15 | "tags":{ 16 | 17 | } 18 | }, 19 | "sap.flp":{ 20 | "target":{ 21 | "inboundId":"WorkflowTask-DisplayMyInbox", 22 | "parameters":{ 23 | "substitution":{ 24 | "value":{ 25 | "value":"true", 26 | "format":"plain" 27 | } 28 | }, 29 | "userSearch":{ 30 | "value":{ 31 | "value":"false", 32 | "format":"plain" 33 | } 34 | } 35 | } 36 | } 37 | } 38 | } 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /cf-maintainpurchaseinforecord-lp/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. 2 | 3 | APIs 4 | This project may include APIs to SAP or third-party products or services. 5 | The use of these APIs, products and services may be subject to additional 6 | agreements. In no event shall the application of the Apache Software 7 | License, v.2 to this project grant any rights in or to these APIs, 8 | products or services that would alter, expand, be inconsistent with, 9 | or supersede any terms of these additional agreements. “API” means 10 | application programming interfaces, as well as their respective 11 | specifications and implementing code that allows other software 12 | products to communicate with or call on SAP or third party products 13 | or services (for example, SAP Enterprise Services, BAPIs, Idocs, RFCs 14 | and ABAP calls or other user exits) and may be made available through 15 | SAP or third party products, SDKs, documentation or other media. -------------------------------------------------------------------------------- /collaboration-sample/appstartui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | DocumentAuditProcess 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | onboarding 9 | 10 | 17 | 18 | 19 | 20 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/RemoteAccessException.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards; 2 | 3 | /** 4 | * Common runtime exception used for issues when accessing remote endpoints. 5 | */ 6 | public class RemoteAccessException extends RuntimeException { 7 | 8 | private static final long serialVersionUID = -2753919087169368903L; 9 | 10 | public RemoteAccessException() { 11 | } 12 | 13 | public RemoteAccessException(String message) { 14 | super(message); 15 | } 16 | 17 | public RemoteAccessException(Throwable cause) { 18 | super(cause); 19 | } 20 | 21 | public RemoteAccessException(String message, Throwable cause) { 22 | super(message, cause); 23 | } 24 | 25 | public RemoteAccessException(String message, Throwable cause, boolean enableSuppression, 26 | boolean writableStackTrace) { 27 | super(message, cause, enableSuppression, writableStackTrace); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/README.md: -------------------------------------------------------------------------------- 1 | # Integrating SAP CP Workflow with Microsoft Outlook 2 | 3 | ## Description 4 | This sample project contains a Java application explains to integrate SAP Cloud Platform Workflow with Microsoft Outlook (Office 365 edition). The following SCN blog explains the scenario in detail: 5 | 6 | [Integrating SAP Cloud Platform Workflow with Microsoft Outlook](https://blogs.sap.com/?p=1049876) 7 | 8 | ### Solution Diagram 9 | ![Solution Diagram](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-outlook-integration-sample/images/SolutionArchitecture.png?raw=true) 10 | 11 | ## Known Issues 12 | No known issues. 13 | 14 | ## How to Obtain Support 15 | The project is provided "as-is", with no expected changes or support. 16 | 17 | ## License 18 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP-samples/fsm-extension-sample/blob/master/LICENSE) file 19 | -------------------------------------------------------------------------------- /collaboration-sample/.che/project.json: -------------------------------------------------------------------------------- 1 | {"type":"sap.web","builders":{"configs":{}},"runners":{"configs":{}},"attributes":{"sap.watt.common.setting":["{\"projectType\":[\"sap.watt.uitools.ide.fiori\",\"sap.watt.uitools.ide.web\",\"sap.bpm.webide.wfs.projectType.id\",\"sap.web\"],\"build\":{\"targetFolder\":\"dist\",\"sourceFolder\":\"webapp\"},\"generation\":[{\"templateId\":\"ui5template.basicSAPUI5ApplicationProjectCommon\",\"templateVersion\":\"1.32.0\",\"dateTimeStamp\":\"Mon, 12 Mar 2018 04:29:02 GMT\"},{\"templateId\":\"ui5template.basicSAPUI5ApplicationProject\",\"templateVersion\":\"1.40.12\",\"dateTimeStamp\":\"Mon, 12 Mar 2018 04:29:03 GMT\"}],\"codeCheckingTriggers\":{\"notifyBeforePush\":false,\"notifyBeforePushLevel\":\"Error\",\"blockPush\":false,\"blockPushLevel\":\"Error\"},\"translation\":{\"translationDomain\":\"\",\"supportedLanguages\":\"en,fr,de\",\"defaultLanguage\":\"en\",\"defaultI18NPropertyFile\":\"i18n.properties\",\"resourceModelName\":\"i18n\"},\"basevalidator\":{\"services\":{\"js\":\"fioriJsValidator\",\"xml\":\"fioriXmlAnalysis\"}}}"]},"mixinTypes":[]} 2 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/Application.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards; 2 | 3 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 4 | import org.springframework.boot.builder.SpringApplicationBuilder; 5 | import org.springframework.boot.web.support.SpringBootServletInitializer; 6 | import org.springframework.context.annotation.ComponentScan; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | /** 10 | * Main class for this application. 11 | */ 12 | @Configuration 13 | @ComponentScan(basePackages = "com.sap.bpm.wfs.forms.adaptivecards") 14 | @EnableAutoConfiguration 15 | public class Application extends SpringBootServletInitializer { 16 | 17 | public static void main(String[] args) { 18 | } 19 | 20 | @Override 21 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 22 | return builder.sources(applicationClass); 23 | } 24 | 25 | private static Class applicationClass = Application.class; 26 | } 27 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/util/Task.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.util; 2 | 3 | import com.fasterxml.jackson.databind.node.ObjectNode; 4 | 5 | public class Task { 6 | 7 | private ObjectNode info; 8 | private ObjectNode context; 9 | private ObjectNode form; 10 | 11 | public Task(ObjectNode info, ObjectNode context, ObjectNode form) { 12 | this.info = info; 13 | this.context = context; 14 | this.form = form; 15 | } 16 | 17 | public ObjectNode getInfo() { 18 | return info; 19 | } 20 | 21 | public ObjectNode getForm() { 22 | return form; 23 | } 24 | 25 | public void setForm(ObjectNode form) { 26 | this.form = form; 27 | } 28 | 29 | public ObjectNode getContext() { 30 | return context; 31 | } 32 | 33 | public void setContext(ObjectNode context) { 34 | this.context = context; 35 | } 36 | 37 | public void setInfo(ObjectNode info) { 38 | this.info = info; 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /collaboration-sample/appstartui/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Upload Document For Audit Review 2 | appTitle=Audit Review 3 | appDescription=Start Audit Review Workflow for JAM Documents 4 | 5 | DocumentDetailsHeader= Document Details 6 | DocumentNumber= Document Number 7 | ProjectName= Project Name 8 | ProjectDesc= Project Description 9 | Classification= Classification 10 | Deadline= Publishing Deadline 11 | BusinessUnit= Business Unit 12 | DocumentType= Document Type 13 | QuarterYr= Quarter/Year 14 | SelectReviewersHeader= Select Reviewers 15 | SelectApproversHeader= Select Approvers 16 | AdditionalPropsHeader= Comments for Reviewers 17 | NewPropBtn= New Property 18 | StartApprovalBtn= Send for Review 19 | ResetBtn= Reset 20 | UploadFileBtn= Upload File 21 | FileName= File to Upload 22 | BrowseBtn= Browse... 23 | TaxTeamReviewerLbl= Tax Department 24 | AccountingTeamReviewerLbl= Accounting Department 25 | HeadOfBAReviewerLbl= Business Analyst Heads 26 | FinanceTeamReviewerLbl= External Auditors 27 | AuditMgrsReviewerLbl= External Audit Heads 28 | GrpHeadsReviewerLbl= Group Reporting Heads -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/config/TaskSchedulerConfig.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.core.task.TaskExecutor; 6 | import org.springframework.scheduling.TaskScheduler; 7 | import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler; 8 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 9 | 10 | @Configuration 11 | public class TaskSchedulerConfig { 12 | 13 | @Bean 14 | public TaskExecutor threadPoolTaskExecutor() { 15 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 16 | executor.setCorePoolSize(4); 17 | executor.setMaxPoolSize(4); 18 | executor.setThreadNamePrefix("default_task_executor_thread"); 19 | executor.initialize(); 20 | return executor; 21 | } 22 | 23 | @Bean 24 | public TaskScheduler taskScheduler() { 25 | return new ConcurrentTaskScheduler(); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/controller/app.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller" 3 | ], 4 | /** 5 | * @param {typeof sap.ui.core.mvc.Controller} Controller 6 | */ 7 | function (Controller) { 8 | "use strict"; 9 | 10 | return Controller.extend("sap.demo.bpm.taskui.controller.app", { 11 | onInit: function () { 12 | var that = this; 13 | $.ajax({ 14 | url: "/sapdemobpmtaskui/NorthWind_Dest/V3/Northwind/Northwind.svc/Suppliers?$format=json", 15 | method: "GET", 16 | async: false, 17 | success: function (result, xhr, data) { 18 | var supplierData = data.responseJSON.value; 19 | var existingData = that.getView().getModel(); 20 | existingData.oData.Suppliers = {}; 21 | existingData.oData.Suppliers = supplierData; 22 | that.getView().setModel(existingData); 23 | } 24 | }); 25 | 26 | } 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Confirm Equipment 2 | appTitle = Confirm Equipment 3 | appDescription=Buddy shall change or confirm equipment 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empDetails = Employment Information 10 | empID = User ID 11 | jobCode = Job Code 12 | jobTitle = Job Title 13 | workLocation = Work Location 14 | legalEntity = Legal Entity 15 | businessUnit = Business Unit 16 | division = Division 17 | department = Department 18 | company = Parent Company 19 | costCenter = Cost Center 20 | fullTime = Is Fulltime Employee 21 | position = Position Code 22 | firstName = First Name 23 | lastName = Last Name 24 | address = Employee Address 25 | tableTitle = Equipment Needed 26 | equipType = Type 27 | equipDesc = Description 28 | equipReqLoc = Requested Location 29 | equipPrice = Price 30 | newEquipment = Add Equipment 31 | addEquipment = Add new Equipment 32 | newEquipmentDetails = Equipment Details 33 | equip = Equipment 34 | save = Save 35 | empty = This field cannot be empty 36 | noDataText = Add new equipments -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Confirm Equipment 2 | appTitle = Confirm Equipment 3 | appDescription=Buddy shall change or confirm equipment 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empDetails = Employment Information 10 | empID = User ID 11 | jobCode = Job Code 12 | jobTitle = Job Title 13 | workLocation = Work Location 14 | legalEntity = Legal Entity 15 | businessUnit = Business Unit 16 | division = Division 17 | department = Department 18 | company = Parent Company 19 | costCenter = Cost Center 20 | fullTime = Is Fulltime Employee 21 | position = Position Code 22 | firstName = First Name 23 | lastName = Last Name 24 | address = Employee Address 25 | tableTitle = Equipment Needed 26 | equipType = Type 27 | equipDesc = Description 28 | equipReqLoc = Requested Location 29 | equipPrice = Price 30 | newEquipment = Add Equipment 31 | addEquipment = Add New Equipment 32 | newEquipmentDetails = Equipment Details 33 | equip = Equipment 34 | save = Save 35 | empty = This field cannot be empty 36 | noDataText = No equipment requested -------------------------------------------------------------------------------- /cf-onboarding-sample/onboarding/scripts/onboard/PrepareRulesPayload.js: -------------------------------------------------------------------------------- 1 | var empJob = $.context.empData.d.results[0].empInfo.jobInfoNav.results[0]; 2 | var empData = $.context.empData.d.results[0]; 3 | 4 | /************ Prepare Input Payload to Execute Rules ****************/ 5 | var employee = {}; 6 | employee.countryOfCompany = "USA"; 7 | employee.isFullTimeEmployee = empJob.isFulltimeEmployee; 8 | employee.company = empJob.company; 9 | employee.jobTitle = empJob.jobTitle; 10 | 11 | var Vocabulary = [{ 12 | "Employee": employee 13 | }]; 14 | var rulesPayload = { 15 | "RuleServiceId": "6bbd196d50c14b918d04c181e78d3a5b", 16 | "RuleServiceVersion": "000001000000000000", 17 | "Vocabulary": Vocabulary 18 | }; 19 | $.context.rulesPayload = rulesPayload; 20 | 21 | /************ Enhance Workflow Context for additional attributes ****************/ 22 | var attributes = { 23 | username: empData.firstName + " " + empData.lastName, 24 | division: empData.division, 25 | city: empData.city, 26 | country: empData.country, 27 | jobCode: empData.jobCode, 28 | jobTitle: empJob.jobTitle 29 | }; 30 | $.context.empData.personalInfo = attributes; -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Accept Workplace 2 | appTitle = Accept Workplace 3 | appDescription=Buddy shall accept that the workplace is ready for new hire 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empDetails = Employment Information 10 | empID = User ID 11 | hireDate = Hire Date 12 | jobCode = Job Code 13 | jobTitle = Job Title 14 | workLocation = Work Location 15 | legalEntity = Legal Entity 16 | businessUnit = Business Unit 17 | division = Division 18 | department = Department 19 | company = Parent Company 20 | costCenter = Cost Center 21 | countryOfCompany = Country of Company 22 | fullTime = Is Fulltime Employee 23 | position = Position Code 24 | firstName = First Name 25 | lastName = Last Name 26 | address = Employee Address 27 | tableTitle = Equipment Needed 28 | equipType = Type 29 | equipDesc = Description 30 | equipReqDate = Expected Date 31 | equipReqLoc = Requested Location 32 | equipPrice = Price 33 | newEquipmentDetails = Equipment Details 34 | equip = Equipment 35 | status = Status 36 | statusValue = Delivered 37 | startDate = Employment Start Date 38 | noDataText = No equipments requested -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Accept Workplace 2 | appTitle = Accept Workplace 3 | appDescription=Buddy shall accept that the workplace is ready for new hire 4 | createdOn = Created On 5 | description = Description 6 | persInfo = Personal Information 7 | jobInfo = Job Information 8 | unitInfo = Unit Information 9 | empDetails = Employment Information 10 | empID = User ID 11 | hireDate = Hire Date 12 | jobCode = Job Code 13 | jobTitle = Job Title 14 | workLocation = Work Location 15 | legalEntity = Legal Entity 16 | businessUnit = Business Unit 17 | division = Division 18 | department = Department 19 | company = Parent Company 20 | costCenter = Cost Center 21 | countryOfCompany = Country of Company 22 | fullTime = Is Fulltime Employee 23 | position = Position Code 24 | firstName = First Name 25 | lastName = Last Name 26 | address = Employee Address 27 | tableTitle = Equipment Needed 28 | equipType = Type 29 | equipDesc = Description 30 | equipReqDate = Expected Date 31 | equipReqLoc = Requested Location 32 | equipPrice = Price 33 | newEquipmentDetails = Equipment Details 34 | equip = Equipment 35 | status = Status 36 | statusValue = Delivered 37 | startDate = Employment Start Date 38 | noDataText = No equipments requested -------------------------------------------------------------------------------- /collaboration-sample/flp-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "application": { 3 | "id": "", 4 | "title": "com.sap.cloud.workflow.samples.DocumentAuditProcess", 5 | "type": "SAP_UI5_Component", 6 | "componentUrl": "/appstartui", 7 | "appUrl": "#DocumentAuditProcess-Display", 8 | "navigationComponentName": "com.sap.cloud.workflow.samples.DocumentAuditProcess", 9 | "intentSemanticObject": "DocumentAuditProcess", 10 | "intentAction": "Display", 11 | "html5ApplicationName": "documentauditprocess", 12 | "HCPParentApplicationName": "" 13 | }, 14 | "assignment": { 15 | "groups": [ 16 | "5df8b5ce-4525-4e86-9e7c-c8c4df2f37dd" 17 | ], 18 | "contentPackages": [ 19 | "00000000-0000-2222-0000-00000000" 20 | ], 21 | "categories": [] 22 | }, 23 | "tile": { 24 | "type": "StaticTile", 25 | "title": "Start the Workflow", 26 | "subtitle": "Sample App", 27 | "searchKeywords": "Start the Workflow,Sample App", 28 | "displayIconUrl": "sap-icon://approvals", 29 | "displayInfoText": "", 30 | "size": "1x1", 31 | "serviceURL": "", 32 | "refreshInterval": "" 33 | } 34 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/xs-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/index.html", 3 | "authenticationMethod": "route", 4 | "logout": { 5 | "logoutEndpoint": "/do/logout" 6 | }, 7 | "routes": [ 8 | { 9 | "source": "^/bpmworkflowruntime/(.*)$", 10 | "target": "/$1", 11 | "service": "com.sap.bpm.workflow", 12 | "endpoint": "workflow_rest_url", 13 | "authenticationType": "xsuaa" 14 | }, 15 | { 16 | "source": "^/S4HANA_Dest/(.*)$", 17 | "target": "/$1", 18 | "destination": "FUB_ODATA", 19 | "authenticationType": "none" 20 | }, 21 | { 22 | "source": "^/SFSF_Dest/(.*)$", 23 | "target": "/$1", 24 | "destination": "SFSF_salesdemo2", 25 | "authenticationType": "none" 26 | }, 27 | { 28 | "source": "^/NorthWind_Dest/(.*)$", 29 | "target": "/$1", 30 | "destination": "northwind", 31 | "authenticationType": "none" 32 | }, 33 | { 34 | "source": "^(.*)$", 35 | "target": "$1", 36 | "service": "html5-apps-repo-rt", 37 | "authenticationType": "xsuaa" 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /collaboration-sample/neo-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "welcomeFile": "/appstartui/index.html", 3 | "routes": [ 4 | { 5 | "path": "/resources", 6 | "target": { 7 | "type": "service", 8 | "name": "sapui5", 9 | "entryPath": "/resources", 10 | "version": "1.52.7" 11 | }, 12 | "description": "SAPUI5 Resources" 13 | }, 14 | { 15 | "path": "/test-resources", 16 | "target": { 17 | "type": "service", 18 | "name": "sapui5", 19 | "entryPath": "/test-resources", 20 | "version": "1.52.7" 21 | }, 22 | "description": "SAPUI5 Test Resources" 23 | }, 24 | { 25 | "path": "/sap_jam_odata", 26 | "target": { 27 | "type": "destination", 28 | "name": "sap_jam_odata" 29 | }, 30 | "description": "SAP JAM" 31 | }, 32 | { 33 | "path": "/bpmworkflowruntime", 34 | "target": { 35 | "type": "destination", 36 | "name": "bpmworkflowruntime" 37 | }, 38 | "description": "SAP Cloud Platform Workflow" 39 | }, 40 | { 41 | "path": "/bpmrulesruntime", 42 | "target": { 43 | "type": "destination", 44 | "name": "bpmrulesruntime" 45 | }, 46 | "description": "SAP Cloud Platform Business Rules" 47 | } 48 | ], 49 | "sendWelcomeFileRedirect": true 50 | } -------------------------------------------------------------------------------- /collaboration-sample/appstartui/configuration/configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "SAPJamConfigurations": { 3 | "jamBaseURL": "", 4 | "jamFeedBootstrapUrl":"", 5 | "jamAccountFeedEndpoint": "", 6 | "jamGroupID": "", 7 | "jamApprovalFolderID": "", 8 | "jamFinalFolderID": "" 9 | }, 10 | "Requestor": { 11 | "Email": "stevecook@sapdemo.com", 12 | "UserID": "", 13 | "Name": "Steve Cook" 14 | }, 15 | "Approvers": { 16 | "Tax": [{ 17 | "Email": "tclark@sapdemo.com", 18 | "UserID": "", 19 | "Name": "Thomas Clark" 20 | }, { 21 | "Email": "wscott@sapdemo.com", 22 | "UserID": "", 23 | "Name": "Wendy Scott" 24 | }], 25 | "Accounting": [{ 26 | "Email": "jeff.blackwell@sapdemo.com", 27 | "UserID": "", 28 | "Name": "Jeff Blackwell" 29 | }, { 30 | "Email": "john.edrich@sapdemo.com", 31 | "UserID": "", 32 | "Name": "John Edrich" 33 | }], 34 | "HeadOfBA": [{ 35 | "Email": "kevin.hart@sapdemo.com", 36 | "UserID": "", 37 | "Name": "Kevin Hart" 38 | }, { 39 | "Email": "denny.harris@sapdemo.com", 40 | "UserID": "", 41 | "Name": "Denny Harris" 42 | }], 43 | "ExternalAuditors": [{ 44 | "Email": "sdesikan@sapdemo.com", 45 | "UserID": "", 46 | "Name": "Sudarsan Desikan" 47 | }, { 48 | "Email": "insalesrep02@ondemand.com", 49 | "UserID": "", 50 | "Name": "Amit Gupta" 51 | }], 52 | "ExternalAuditHeads": [{ 53 | "Email": "mike.adams@sapdemo.com", 54 | "UserID": "", 55 | "Name": "Mike Adams" 56 | }], 57 | "HeadOfGroupReporting": [{ 58 | "Email": "desaleslife@sapdemo.com", 59 | "UserID": "", 60 | "Name": "Peter Schmidt" 61 | }] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/scripts/Approval/ProcessApproverDetails.js: -------------------------------------------------------------------------------- 1 | $.context.internal.step.isRequired = true; 2 | var approverUserIDs = []; 3 | var approverGroupIDs = []; 4 | var approverEmailIDs = []; 5 | var ruleResult = $.context.internal.ruleresult.Result; 6 | 7 | if (ruleResult.length > 0 && ruleResult[0].ApproversList.length) { 8 | $.context.internal.step.approver = $.context.internal.ruleresult.Result[0].ApproversList[0]; 9 | for (var i = 0; i < ruleResult[0].ApproversList.length; i++) { 10 | approverUserIDs.push(ruleResult[0].ApproversList[i].UserId); 11 | approverGroupIDs.push(ruleResult[0].ApproversList[i].GroupId); 12 | approverEmailIDs.push(ruleResult[0].ApproversList[i].Email); 13 | } 14 | $.context.internal.step.approver.UserId = approverUserIDs.toString(); 15 | $.context.internal.step.approver.GroupId = approverGroupIDs.toString(); 16 | $.context.internal.step.approver.Email = approverEmailIDs.toString(); 17 | 18 | } 19 | 20 | // sanitize rule result 21 | if (!$.context.internal.step.isRequired) { 22 | var decision = { 23 | "Id": "-", 24 | "Role": $.context.role, 25 | "Decision": "Approve", 26 | "Comments": "Automatic approval by rule" 27 | }; 28 | $.context.History.push(decision); 29 | $.context.internal.step.isReapproval = false; 30 | } else { 31 | if (!$.context.internal.step.isReapproval) { 32 | $.context.internal.step.createdDate = new Date().toISOString(); 33 | } 34 | $.context.internal.step.isReapproval = false; 35 | 36 | } 37 | 38 | // Prepare User Task 39 | $.context.comments = ""; 40 | $.context.requireFullReapproval = false; 41 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/resources/com/sap/bpm/wfs/forms/adaptivecards/transform.jslt: -------------------------------------------------------------------------------- 1 | def range(length, list) 2 | if (size($list) < $length) 3 | range($length, $list + [size($list)]) 4 | else 5 | $list 6 | 7 | def zip(arr1, arr2)[ 8 | for (range(size($arr1), []))[$arr1[.], $arr2[.]]] 9 | 10 | def path(root, segments, fallback) 11 | if (size($segments) == 1) 12 | get-key($root, $segments[0], $fallback) 13 | else 14 | path(get-key($root, $segments[0], $fallback), $segments[1 : ], $fallback) 15 | 16 | def resolve(root, path) 17 | let clean_path = replace(replace($path, "^\\$\\{context", "data"), "\\}$", "") 18 | let segments = split($clean_path, "\\.") 19 | let result = path($root, $segments, "") 20 | $result 21 | 22 | let root = . 23 | 24 | { 25 | "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", 26 | "type": "AdaptiveCard", 27 | "version": "1.0", 28 | "originator": .originator, 29 | "body": flatten(zip([ 30 | for (.content) { 31 | "type": "TextBlock", 32 | "text": .label, 33 | "wrap": true 34 | }], [ 35 | for (.content) { 36 | "type": "Input.Text", 37 | "id": .id, 38 | "placeholder": .placeholder, 39 | "value": resolve($root, .value) 40 | }])), 41 | "actions": [ 42 | for (.decisions) { 43 | "type": "Action.Http", 44 | "title": .text, 45 | "method": "POST", 46 | "url": $root.cardSubmissionUrl + "/action/" + .id, 47 | "body": .id 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onboardequip", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onboardequip.view.ConfirmEquipment", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onboardequip.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [{ 68 | "uri": "css/style.css" 69 | }] 70 | } 71 | }, 72 | "sap.platform.hcp": { 73 | "uri": "confirmEquip", 74 | "_version": "1.1.0" 75 | } 76 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/acceptWorkplace/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onboardaccept", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onboardaccept.view.AcceptWorkplace", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onboardaccept.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [{ 68 | "uri": "css/style.css" 69 | }] 70 | } 71 | }, 72 | "sap.platform.hcp": { 73 | "uri": "acceptWorkplace", 74 | "_version": "1.1.0" 75 | } 76 | } -------------------------------------------------------------------------------- /cf-onboarding-sample/approveEquip/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onboardapprove", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onboardapprove.view.ApproveEquipment", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onboardapprove.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [{ 68 | "uri": "css/style.css" 69 | }] 70 | } 71 | }, 72 | "sap.platform.hcp": { 73 | "uri": "approveEquip", 74 | "_version": "1.1.0" 75 | } 76 | } -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onbequip", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onbequip.view.ConfirmEquipment", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onbequip.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [ 68 | { 69 | "uri": "css/style.css" 70 | } 71 | ] 72 | } 73 | }, 74 | "sap.platform.hcp": { 75 | "uri": "confirmEquip", 76 | "_version": "1.1.0" 77 | } 78 | } -------------------------------------------------------------------------------- /onboarding-sample/taskui/approveEquip/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onbapprove", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onbapprove.view.ApproveEquipment", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onbapprove.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [ 68 | { 69 | "uri": "css/style.css" 70 | } 71 | ] 72 | } 73 | }, 74 | "sap.platform.hcp": { 75 | "uri": "approveEquip", 76 | "_version": "1.1.0" 77 | } 78 | } -------------------------------------------------------------------------------- /onboarding-sample/taskui/acceptWorkplace/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.5.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.onbaccept", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.onbaccept.view.AcceptWorkplace", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.core": {}, 46 | "sap.m": {}, 47 | "sap.ui.layout": {}, 48 | "sap.ushell": {}, 49 | "sap.collaboration": {}, 50 | "sap.ui.comp": {}, 51 | "sap.uxap": {} 52 | } 53 | }, 54 | "contentDensities": { 55 | "compact": true, 56 | "cozy": true 57 | }, 58 | "models": { 59 | "i18n": { 60 | "type": "sap.ui.model.resource.ResourceModel", 61 | "settings": { 62 | "bundleName": "com.sap.cloud.workflow.samples.onbaccept.i18n.i18n" 63 | } 64 | } 65 | }, 66 | "resources": { 67 | "css": [ 68 | { 69 | "uri": "css/style.css" 70 | } 71 | ] 72 | } 73 | }, 74 | "sap.platform.hcp": { 75 | "uri": "acceptWorkplace", 76 | "_version": "1.1.0" 77 | } 78 | } 79 | 80 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: cloud-workflow-samples 3 | Upstream-Contact: Archana Shukla 4 | Source: https://github.com/sap-samples/cloud-workflow-samples 5 | Disclaimer: The code in this project may include calls to APIs (“API Calls”) of 6 | SAP or third-party products or services developed outside of this project 7 | (“External Products”). 8 | “APIs” means application programming interfaces, as well as their respective 9 | specifications and implementing code that allows software to communicate with 10 | other software. 11 | API Calls to External Products are not licensed under the open source license 12 | that governs this project. The use of such API Calls and related External 13 | Products are subject to applicable additional agreements with the relevant 14 | provider of the External Products. In no event shall the open source license 15 | that governs this project grant any rights in or to any External Products,or 16 | alter, expand or supersede any terms of the applicable additional agreements. 17 | If you have a valid license agreement with SAP for the use of a particular SAP 18 | External Product, then you may make use of any API Calls included in this 19 | project’s code for that SAP External Product, subject to the terms of such 20 | license agreement. If you do not have a valid license agreement for the use of 21 | a particular SAP External Product, then you may only make use of any API Calls 22 | in this project for that SAP External Product for your internal, non-productive 23 | and non-commercial test and evaluation of such API Calls. Nothing herein grants 24 | you any rights to use or access any SAP External Product, or provide any third 25 | parties the right to use of access any SAP External Product, through API Calls. 26 | 27 | Files: * 28 | Copyright: 2018 SAP SE or an SAP affiliate company and cloud-workflow-samples contributors 29 | License: Apache-2.0 30 | -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/README.md: -------------------------------------------------------------------------------- 1 | # Setup Workflow Management Fiori Launchpad 2 | 3 | You will import, build and deploy this multi target project that will create a Fiori Launchpad to access workflow, business rules and process visibility applications. 4 | 5 | ### Pre-Requisites 6 | To successfully deploy this FLP, you need an account in SAP Cloud Platform Cloud Foundry environment with entitlements to the following services: 7 | 1. Portal 8 | 2. Workflow 9 | 3. Business Rules 10 | 4. Process Visibility 11 | 5. Application Runtime 12 | 6. HTML5 Applications 13 | 14 | ### Deploy Fiori Launchpad Application 15 | 1. Download the Multi-Target Application (MTA) project **WorkflowManagementFLP.tar.zip** from the **resources** folder and uncompress the file. 16 | 2. Use *SAP WebIDE* or *SAP Business Application Studio* to import, build and deploy the MTA project into the SAP Cloud Platform account. 17 | - SAP Web IDE ([import archive](https://help.sap.com/viewer/825270ffffe74d9f988a0f0066ad59f0/CF/en-US/344e8c91e33b4ae8b4032709c45776a3.html) and then [build and deploy](https://help.sap.com/viewer/825270ffffe74d9f988a0f0066ad59f0/CF/en-US/1b0a7a0938944c7fac978d4b8e23a63f.html)) 18 | - SAP Business Application Studio ([deploy a MTA project](https://help.sap.com/viewer/9d1db9835307451daa8c930fbd9ab264/Cloud/en-US/97ef204c568c4496917139cee61224a6.html)) 19 | 20 | ### Access Fiori Launchpad Application 21 | 1. Open your cloud platform cockpit, and goto the **space** where you have deployed the fiori launchpad application. 22 | 2. Open **Applications** from left panel, and click to go into the **WorkflowManagementFLP_appRouter** application. 23 | 3. From the **Overview** section on left panel, click app-router link to work with workflow, business rules and process visibility applications. 24 | 25 | ## License 26 | Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP-samples/fsm-extension-sample/blob/master/LICENSE) file 27 | -------------------------------------------------------------------------------- /cf-onboarding-sample/onboarding/sample-data/onboard/SampleInputContext.json: -------------------------------------------------------------------------------- 1 | { 2 | "managerId": "john.edrich@sapdemo.com", 3 | "buddyId": "lorin.mathew@sapdemo.com", 4 | "userId": "cgrant1", 5 | "empData": { 6 | "d": { 7 | "results": [{ 8 | "zipCode": "94404", 9 | "lastName": "Grant", 10 | "country": "United States", 11 | "hireDate": "/Date(978307200000)/", 12 | "reloLocation": null, 13 | "city": "San Mateo", 14 | "jobTitle": "General Manager, Industries", 15 | "jobCode": "Vice President, Sales (VP-SALES)", 16 | "title": "VP, Sales", 17 | "userId": "cgrant1", 18 | "division": "Industries (IND)", 19 | "defaultFullName": "Carla Grant", 20 | "firstName": "Carla", 21 | "empInfo": { 22 | "__metadata": { 23 | "type": "SFOData.EmpEmployment" 24 | }, 25 | "jobInfoNav": { 26 | "results": [{ 27 | "isFulltimeEmployee": true, 28 | "businessUnit": "ACE_IND", 29 | "costCenter": "30001", 30 | "jobTitle": "VP, Sales", 31 | "countryOfCompany": "USA", 32 | "jobCode": "VP-SALES", 33 | "managerId": "athompson1", 34 | "division": "IND", 35 | "company": "ACE_USA", 36 | "position": "VP_SALES", 37 | "department": "SALES", 38 | "startDate": "/Date(1343606400000)/" 39 | }] 40 | } 41 | }, 42 | "reloWilling": null, 43 | "addressLine1": "1500 Fashion Island Blvd", 44 | "location": "San Mateo (US_SFO)", 45 | "department": "Sales (SALES)", 46 | "keyPosition": false 47 | }] 48 | }, 49 | "team": { 50 | "d": { 51 | "directReports": { 52 | "results": [{ 53 | "__metadata": { 54 | "type": "SFOData.User" 55 | }, 56 | "userId": "dsharp1" 57 | }, { 58 | "__metadata": { 59 | "type": "SFOData.User" 60 | }, 61 | "userId": "cgrant1" 62 | }, { 63 | "__metadata": { 64 | "type": "SFOData.User" 65 | }, 66 | "userId": "sthomas1" 67 | }] 68 | } 69 | } 70 | }, 71 | "buddies": "dsharp1,cgrant1,sthomas1" 72 | } 73 | } -------------------------------------------------------------------------------- /onboarding-sample/taskui/confirmEquip/view/NewEquipment.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 52 | -------------------------------------------------------------------------------- /cf-onboarding-sample/confirmEquip/webapp/view/NewEquipment.fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 52 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/taskui/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.12.0", 3 | "sap.app": { 4 | "id": "sap.demo.bpm.taskui", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "resources": "resources.json", 13 | "ach": "ach", 14 | "sourceTemplate": { 15 | "id": "html5moduletemplates.basicSAPUI5ApplicationProjectModule", 16 | "version": "1.40.12" 17 | } 18 | }, 19 | 20 | "sap.ui": { 21 | "technology": "UI5", 22 | "icons": { 23 | "icon": "", 24 | "favIcon": "", 25 | "phone": "", 26 | "phone@2": "", 27 | "tablet": "", 28 | "tablet@2": "" 29 | }, 30 | "deviceTypes": { 31 | "desktop": true, 32 | "tablet": true, 33 | "phone": true 34 | } 35 | }, 36 | 37 | "sap.ui5": { 38 | "flexEnabled": false, 39 | "rootView": { 40 | "viewName": "sap.demo.bpm.taskui.view.app", 41 | "type": "XML", 42 | "async": true, 43 | "id": "app" 44 | }, 45 | "dependencies": { 46 | "minUI5Version": "1.60.1", 47 | "libs": { 48 | "sap.ui.core": {}, 49 | "sap.m": {}, 50 | "sap.ui.layout": {} 51 | } 52 | }, 53 | "contentDensities": { 54 | "compact": true, 55 | "cozy": true 56 | }, 57 | "models": { 58 | "i18n": { 59 | "type": "sap.ui.model.resource.ResourceModel", 60 | "settings": { 61 | "bundleName": "sap.demo.bpm.taskui.i18n.i18n" 62 | } 63 | } 64 | }, 65 | "resources": { 66 | "css": [{ 67 | "uri": "css/style.css" 68 | }] 69 | }, 70 | "routing": { 71 | "config": { 72 | "routerClass": "sap.m.routing.Router", 73 | "viewType": "XML", 74 | "async": true, 75 | "viewPath": "sap.demo.bpm.taskui.view", 76 | "controlAggregation": "pages", 77 | "controlId": "app", 78 | "clearControlAggregation": false 79 | }, 80 | "routes": [{ 81 | "name": "Routeapp", 82 | "pattern": "Routeapp", 83 | "target": ["Targetapp"] 84 | }], 85 | "targets": { 86 | "Targetapp": { 87 | "viewType": "XML", 88 | "transition": "slide", 89 | "clearControlAggregation": false, 90 | "viewId": "app", 91 | "viewName": "app" 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /collaboration-sample/usertasks/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.8.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.audit", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.audit.view.approvals", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.layout": {}, 46 | "sap.ui.core": {}, 47 | "sap.m": {} 48 | } 49 | }, 50 | "contentDensities": { 51 | "compact": true, 52 | "cozy": true 53 | }, 54 | "models": { 55 | "i18n": { 56 | "type": "sap.ui.model.resource.ResourceModel", 57 | "settings": { 58 | "bundleName": "com.sap.cloud.workflow.samples.audit.i18n.i18n" 59 | } 60 | } 61 | }, 62 | "resources": { 63 | "css": [ 64 | { 65 | "uri": "css/style.css" 66 | } 67 | ] 68 | }, 69 | "routing": { 70 | "config": { 71 | "routerClass": "sap.m.routing.Router", 72 | "viewType": "XML", 73 | "async": true, 74 | "viewPath": "com.sap.cloud.workflow.samples.audit.view", 75 | "controlAggregation": "pages", 76 | "controlId": "idAppControl" 77 | }, 78 | "routes": [ 79 | { 80 | "name": "RouteView1", 81 | "pattern": "RouteView1", 82 | "target": [ 83 | "TargetView1" 84 | ] 85 | } 86 | ], 87 | "targets": { 88 | "TargetView1": { 89 | "viewType": "XML", 90 | "transition": "slide", 91 | "clearAggregation": true, 92 | "viewName": "View1" 93 | } 94 | } 95 | } 96 | }, 97 | "sap.platform.hcp": { 98 | "uri": "usertasks", 99 | "_version": "1.1.0" 100 | } 101 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/homepageflp/portal-site/CommonDataModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "3.0.0", 3 | "identification": { 4 | "id": "5fc71c3c-f2bb-4b9a-bdd2-187b390620b5", 5 | "entityType": "bundle" 6 | }, 7 | "payload": { 8 | "catalogs": [{ 9 | "_version": "3.0.0", 10 | "identification": { 11 | "id": "defaultCatalogId", 12 | "title": "{{title}}", 13 | "entityType": "catalog", 14 | "i18n": "i18n/defaultCatalogId.properties" 15 | }, 16 | "payload": { 17 | "viz": [] 18 | } 19 | }], 20 | "groups": [{ 21 | "_version": "3.0.0", 22 | "identification": { 23 | "id": "defaultGroupId", 24 | "title": "{{title}}", 25 | "entityType": "group", 26 | "i18n": "i18n/defaultGroupId.properties" 27 | }, 28 | "payload": { 29 | "viz": [{ 30 | "id": "sap.demo.bpm.startworkflow-0-1598551576056", 31 | "appId": "sap.demo.bpm.startworkflow", 32 | "vizId": "capex-startworkflow" 33 | }] 34 | } 35 | }, { 36 | "_version": "3.0.0", 37 | "identification": { 38 | "id": "workflow", 39 | "title": "{{title}}", 40 | "entityType": "group", 41 | "i18n": "i18n/workflow.properties" 42 | }, 43 | "payload": { 44 | "viz": [{ 45 | "id": "com.sap.bpm.monitorworkflow-0-1598725289531", 46 | "appId": "com.sap.bpm.monitorworkflow", 47 | "vizId": "bpmworkflowmonitor-DisplayInstances" 48 | }, { 49 | "id": "cross.fnd.fiori.inbox-1-1598725289531", 50 | "appId": "cross.fnd.fiori.inbox", 51 | "vizId": "WorkflowTask-DisplayMyInbox" 52 | }] 53 | } 54 | }], 55 | "sites": [{ 56 | "_version": "3.0.0", 57 | "identification": { 58 | "id": "7124328f-894a-42bb-9fe6-f1c68f09d0c5", 59 | "entityType": "site", 60 | "title": "SAP Fiori launchpad site on Cloud Foundry", 61 | "description": "SAP Fiori launchpad site on Cloud Foundry, deployed from WING" 62 | }, 63 | "payload": { 64 | "config": { 65 | "ushellConfig": { 66 | "renderers": { 67 | "fiori2": { 68 | "componentData": { 69 | "config": { 70 | "applications": { 71 | "Shell-home": {} 72 | } 73 | } 74 | } 75 | } 76 | } 77 | } 78 | }, 79 | "groupsOrder": ["defaultGroupId", "workflow"], 80 | "sap.cloud.portal": { 81 | "config": { 82 | "theme.id": "sap_fiori_3", 83 | "theme.active": ["sap_fiori_3", "sap_fiori_3_dark", "sap_belize_hcb", "sap_belize_hcw"] 84 | } 85 | } 86 | } 87 | }] 88 | } 89 | } -------------------------------------------------------------------------------- /collaboration-sample/appstartui/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.8.0", 3 | "sap.app": { 4 | "id": "com.sap.cloud.workflow.samples.DocumentAuditProcess", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "sourceTemplate": { 13 | "id": "ui5template.basicSAPUI5ApplicationProject", 14 | "version": "1.40.12" 15 | } 16 | }, 17 | "sap.ui": { 18 | "technology": "UI5", 19 | "icons": { 20 | "icon": "", 21 | "favIcon": "", 22 | "phone": "", 23 | "phone@2": "", 24 | "tablet": "", 25 | "tablet@2": "" 26 | }, 27 | "deviceTypes": { 28 | "desktop": true, 29 | "tablet": true, 30 | "phone": true 31 | }, 32 | "supportedThemes": [ 33 | "sap_hcb", 34 | "sap_belize" 35 | ] 36 | }, 37 | "sap.ui5": { 38 | "rootView": { 39 | "viewName": "com.sap.cloud.workflow.samples.DocumentAuditProcess.view.startApproval", 40 | "type": "XML" 41 | }, 42 | "dependencies": { 43 | "minUI5Version": "1.30.0", 44 | "libs": { 45 | "sap.ui.layout": {}, 46 | "sap.ui.core": {}, 47 | "sap.m": {} 48 | } 49 | }, 50 | "contentDensities": { 51 | "compact": true, 52 | "cozy": true 53 | }, 54 | "models": { 55 | "i18n": { 56 | "type": "sap.ui.model.resource.ResourceModel", 57 | "settings": { 58 | "bundleName": "com.sap.cloud.workflow.samples.DocumentAuditProcess.i18n.i18n" 59 | } 60 | } 61 | }, 62 | "resources": { 63 | "css": [ 64 | { 65 | "uri": "css/style.css" 66 | } 67 | ] 68 | }, 69 | "routing": { 70 | "config": { 71 | "routerClass": "sap.m.routing.Router", 72 | "viewType": "XML", 73 | "async": true, 74 | "viewPath": "com.sap.cloud.workflow.samples.DocumentAuditProcess.view", 75 | "controlAggregation": "pages", 76 | "controlId": "idAppControl" 77 | }, 78 | "routes": [ 79 | { 80 | "name": "RouteView1", 81 | "pattern": "RouteView1", 82 | "target": [ 83 | "TargetView1" 84 | ] 85 | } 86 | ], 87 | "targets": { 88 | "TargetView1": { 89 | "viewType": "XML", 90 | "transition": "slide", 91 | "clearAggregation": true, 92 | "viewName": "View1" 93 | } 94 | } 95 | } 96 | }, 97 | "sap.platform.hcp": { 98 | "uri": "appstartui", 99 | "_version": "1.1.0" 100 | } 101 | } -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/mta.yaml: -------------------------------------------------------------------------------- 1 | ID: WorkflowManagementFLP 2 | _schema-version: '2.1' 3 | parameters: 4 | deploy_mode: html5-repo 5 | version: 0.0.1 6 | modules: 7 | - name: WorkflowManagementFLP_appRouter 8 | type: approuter.nodejs 9 | path: WorkflowManagementFLP_appRouter 10 | parameters: 11 | disk-quota: 256M 12 | memory: 256M 13 | requires: 14 | - name: WorkflowManagementFLP_html5_repo_runtime 15 | - name: uaa_workflowmanagement 16 | - name: wm_workflow 17 | - name: wm_processvisibility 18 | - name: wm_businessrules 19 | - name: wm_workflowmanagement 20 | - name: default_portal 21 | - name: WFMFLP 22 | type: com.sap.application.content 23 | path: WFMFLP 24 | parameters: 25 | stack: cflinuxfs3 26 | memory: 128M 27 | buildpack: 'https://github.com/cloudfoundry/nodejs-buildpack/releases/download/v1.6.39/nodejs-buildpack-cflinuxfs3-v1.6.39.zip' 28 | requires: 29 | - name: uaa_workflowmanagement 30 | - name: wm_workflow 31 | - name: wm_processvisibility 32 | - name: wm_businessrules 33 | - name: wm_workflowmanagement 34 | - name: default_portal 35 | parameters: 36 | content-target: true 37 | service-key: 38 | config: 39 | content-endpoint: developer 40 | name: content-deploy-key 41 | resources: 42 | - name: WorkflowManagementFLP_html5_repo_runtime 43 | parameters: 44 | service-plan: app-runtime 45 | service: html5-apps-repo 46 | type: org.cloudfoundry.managed-service 47 | - name: uaa_workflowmanagement 48 | parameters: 49 | path: ./xs-security.json 50 | service-plan: application 51 | service: xsuaa 52 | type: org.cloudfoundry.managed-service 53 | - name: default_portal 54 | parameters: 55 | service-plan: standard 56 | service: portal 57 | type: org.cloudfoundry.managed-service 58 | - name: wm_processvisibility 59 | parameters: 60 | service-plan: lite 61 | service: processvisibility 62 | type: org.cloudfoundry.existing-service 63 | - name: wm_workflow 64 | parameters: 65 | service-plan: lite 66 | service: workflow 67 | type: org.cloudfoundry.existing-service 68 | - name: wm_businessrules 69 | parameters: 70 | service-plan: lite 71 | service: business-rules 72 | type: org.cloudfoundry.existing-service 73 | - name: wm_workflowmanagement 74 | parameters: 75 | service-plan: lite 76 | service: business-rules 77 | type: org.cloudfoundry.existing-service 78 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/CardBuilder.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Scanner; 6 | 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.beans.factory.annotation.Value; 11 | import org.springframework.context.annotation.Bean; 12 | import org.springframework.context.annotation.Configuration; 13 | 14 | import com.fasterxml.jackson.databind.JsonNode; 15 | import com.fasterxml.jackson.databind.node.ObjectNode; 16 | import com.fasterxml.jackson.databind.node.TextNode; 17 | import com.sap.bpm.wfs.forms.adaptivecards.config.VcapConfig; 18 | import com.sap.bpm.wfs.forms.adaptivecards.util.Task; 19 | import com.schibsted.spt.data.jslt.Expression; 20 | import com.schibsted.spt.data.jslt.Parser; 21 | 22 | /** 23 | * Builds a Microsoft Adaptive Card out of of a CP Workflow Task and Form. 24 | */ 25 | @Configuration 26 | public class CardBuilder { 27 | 28 | private static final Logger LOG = LoggerFactory.getLogger(CardBuilder.class); 29 | 30 | @Bean 31 | public CardBuilder getCardBuilder() { 32 | return this; 33 | } 34 | 35 | @Autowired 36 | private VcapConfig vcapConfig; 37 | 38 | @Value("${card.submission.url}") 39 | private String cardSubmissionUrl; 40 | 41 | public String buildCard(Task task, String originator, String templateFileName) throws IllegalStateException { 42 | LOG.info("Building card for task {}", task.getInfo().path("id").asText()); 43 | 44 | ObjectNode taskFormNode = task.getForm(); 45 | LOG.info("Form: {}", taskFormNode.toString()); 46 | 47 | JsonNode taskContextNode = task.getContext(); 48 | taskFormNode.set("data", taskContextNode); 49 | 50 | taskFormNode.set("cardSubmissionUrl", new TextNode(cardSubmissionUrl + "/submit-card/" + task.getInfo().get("id").asText())); 51 | 52 | taskFormNode.set("originator", new TextNode(originator)); 53 | 54 | String transformString; 55 | try (InputStream transformDocument = CardBuilder.class.getResourceAsStream(templateFileName); 56 | Scanner scanner = new Scanner(transformDocument, "utf-8")) { 57 | transformString = scanner.useDelimiter("\\A").next(); 58 | } catch (IOException e) { 59 | throw new IllegalStateException("Could not read template file: " + templateFileName, e); 60 | } 61 | 62 | Expression jslt = Parser.compileString(transformString); 63 | JsonNode output = jslt.apply(taskFormNode); 64 | LOG.info("Adaptive Card: {}", output); 65 | 66 | return output.toString(); 67 | } 68 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/controller/app.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller", 3 | "sap/m/MessageBox" 4 | ], 5 | /** 6 | * @param {typeof sap.ui.core.mvc.Controller} Controller 7 | */ 8 | function (Controller) { 9 | "use strict"; 10 | 11 | var oController; 12 | var orderBusyDialog; 13 | var oSuccessMessageDialog; 14 | 15 | return Controller.extend("sap.demo.bpm.startworkflow.controller.app", { 16 | onInit: function () { 17 | oController = this; 18 | 19 | var workflowModel = new sap.ui.model.json.JSONModel(); 20 | workflowModel.loadData("/sapdemobpmstartworkflow/model/StartPayload.json", null, false); 21 | oController.getView().setModel(workflowModel); 22 | }, 23 | 24 | onStartPress: function (oEvent) { 25 | // create busy dialog 26 | orderBusyDialog = new sap.m.BusyDialog(); 27 | orderBusyDialog.open(); 28 | 29 | var startContext = oController.getView().getModel().oData; 30 | var workflowStartPayload = {definitionId: "capexapproval", context: startContext} 31 | 32 | // Start workflow 33 | $.ajax({ 34 | url: "/sapdemobpmstartworkflow/bpmworkflowruntime/v1/xsrf-token", 35 | method: "GET", 36 | headers: { 37 | "X-CSRF-Token": "Fetch" 38 | }, 39 | success: function (result, xhr, data) { 40 | var token = data.getResponseHeader("X-CSRF-Token"); 41 | if (token === null) return; 42 | 43 | // Start workflow 44 | $.ajax({ 45 | url: "/sapdemobpmstartworkflow/bpmworkflowruntime/v1/workflow-instances", 46 | type: "POST", 47 | data: JSON.stringify(workflowStartPayload), 48 | headers: { 49 | "X-CSRF-Token": token, 50 | "Content-Type": "application/json" 51 | }, 52 | async: false, 53 | success: function (data) { 54 | orderBusyDialog.close(); 55 | sap.m.MessageBox.information("The workflow is started"); 56 | }, 57 | error: function (data) { 58 | orderBusyDialog.close(); 59 | } 60 | }); 61 | } 62 | }); 63 | } 64 | }) 65 | }); 66 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "1.12.0", 3 | "sap.app": { 4 | "id": "sap.demo.bpm.startworkflow", 5 | "type": "application", 6 | "i18n": "i18n/i18n.properties", 7 | "applicationVersion": { 8 | "version": "1.0.0" 9 | }, 10 | "title": "{{appTitle}}", 11 | "description": "{{appDescription}}", 12 | "resources": "resources.json", 13 | "ach": "ach", 14 | "sourceTemplate": { 15 | "id": "html5moduletemplates.basicSAPUI5ApplicationProjectModule", 16 | "version": "1.40.12" 17 | }, 18 | "crossNavigation": { 19 | "context": {}, 20 | "inbounds": { 21 | "newtile": { 22 | "semanticObject": "capex", 23 | "action": "startworkflow", 24 | "icon": "sap-icon://begin", 25 | "title": "Capital Expenditure Request", 26 | "subTitle": "Start Workflow" 27 | } 28 | } 29 | } 30 | }, 31 | 32 | "sap.ui": { 33 | "technology": "UI5", 34 | "icons": { 35 | "icon": "", 36 | "favIcon": "", 37 | "phone": "", 38 | "phone@2": "", 39 | "tablet": "", 40 | "tablet@2": "" 41 | }, 42 | "deviceTypes": { 43 | "desktop": true, 44 | "tablet": true, 45 | "phone": true 46 | } 47 | }, 48 | 49 | "sap.ui5": { 50 | "flexEnabled": false, 51 | "rootView": { 52 | "viewName": "sap.demo.bpm.startworkflow.view.app", 53 | "type": "XML", 54 | "async": true, 55 | "id": "app" 56 | }, 57 | "dependencies": { 58 | "minUI5Version": "1.60.1", 59 | "libs": { 60 | "sap.ui.core": {}, 61 | "sap.m": {}, 62 | "sap.ui.layout": {} 63 | } 64 | }, 65 | "contentDensities": { 66 | "compact": true, 67 | "cozy": true 68 | }, 69 | "models": { 70 | "i18n": { 71 | "type": "sap.ui.model.resource.ResourceModel", 72 | "settings": { 73 | "bundleName": "sap.demo.bpm.startworkflow.i18n.i18n" 74 | } 75 | } 76 | }, 77 | "resources": { 78 | "css": [{ 79 | "uri": "css/style.css" 80 | }] 81 | }, 82 | "routing": { 83 | "config": { 84 | "routerClass": "sap.m.routing.Router", 85 | "viewType": "XML", 86 | "async": true, 87 | "viewPath": "sap.demo.bpm.startworkflow.view", 88 | "controlAggregation": "pages", 89 | "controlId": "app", 90 | "clearControlAggregation": false 91 | }, 92 | "routes": [{ 93 | "name": "Routeapp", 94 | "pattern": "Routeapp", 95 | "target": ["Targetapp"] 96 | }], 97 | "targets": { 98 | "Targetapp": { 99 | "viewType": "XML", 100 | "transition": "slide", 101 | "clearControlAggregation": false, 102 | "viewId": "app", 103 | "viewName": "app" 104 | } 105 | } 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/util/UaaUtils.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.util; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | 6 | import org.apache.http.client.methods.CloseableHttpResponse; 7 | import org.apache.http.client.methods.HttpPost; 8 | import org.apache.http.impl.client.CloseableHttpClient; 9 | import org.apache.http.impl.client.HttpClients; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | 13 | import com.fasterxml.jackson.databind.ObjectMapper; 14 | import com.fasterxml.jackson.databind.node.ObjectNode; 15 | import com.sap.bpm.wfs.forms.adaptivecards.RemoteAccessException; 16 | import com.sap.bpm.wfs.forms.adaptivecards.config.VcapConfig; 17 | 18 | public class UaaUtils { 19 | 20 | private static final Logger LOG = LoggerFactory.getLogger(UaaUtils.class); 21 | 22 | /* 23 | * Returns a valid access token to call CP Workflow. 24 | * 25 | * @throws IllegalStateException If the token is null or empty 26 | * @throws RemoteAccessException If the authorization server could not be reached 27 | */ 28 | public static String getWorkflowAccessToken(VcapConfig vcapConfig) throws IllegalStateException, RemoteAccessException { 29 | String credentials = vcapConfig.getWorkflowUaaCredentials(); 30 | String oauthTokenEndpoint = vcapConfig.getWorkflowUaaTokenEndpoint() + "?grant_type=client_credentials"; 31 | return getServiceAccessToken(credentials, oauthTokenEndpoint); 32 | } 33 | 34 | /* 35 | * Returns a valid access token to call the destination service. 36 | * 37 | * @throws IllegalStateException If the token is null or empty 38 | * @throws RemoteAccessException If the authorization server could not be reached 39 | */ 40 | public static String getDestinationAccessToken(VcapConfig vcapConfig) throws IllegalStateException, RemoteAccessException { 41 | String credentials = vcapConfig.getDestinationUaaCredentials(); 42 | String oauthTokenEndpoint = vcapConfig.getDestinationUaaTokenEndpoint() + "?grant_type=client_credentials"; 43 | return getServiceAccessToken(credentials, oauthTokenEndpoint); 44 | } 45 | 46 | private static String getServiceAccessToken(String credentials, String oauthTokenEndpoint) throws IllegalStateException, RemoteAccessException { 47 | HttpPost httpPost = new HttpPost(oauthTokenEndpoint); 48 | httpPost.setHeader("Authorization", credentials); 49 | 50 | LOG.debug("Retrieving access token from {}", oauthTokenEndpoint); 51 | 52 | String accessToken = null; 53 | try (CloseableHttpClient httpclient = HttpClients.createDefault(); 54 | CloseableHttpResponse response = httpclient.execute(httpPost); 55 | InputStream content = HttpUtils.getContent(response, "{}")) { 56 | ObjectNode node = (ObjectNode) new ObjectMapper().readTree(content); 57 | accessToken = node.path("access_token").asText(); 58 | } catch (IOException e) { 59 | throw new RemoteAccessException("Error while obtaining access token", e); 60 | } 61 | 62 | if (accessToken == null || accessToken.isEmpty()) { 63 | throw new IllegalStateException("Access token is invalid"); 64 | } 65 | 66 | return accessToken; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /cf-workflowstart-sample/mta.yaml: -------------------------------------------------------------------------------- 1 | _schema-version: "3.2" 2 | ID: workflow-start-sample 3 | version: 0.0.1 4 | modules: 5 | - name: approvals 6 | type: com.sap.application.content 7 | path: approvals 8 | requires: 9 | - name: default_workflow 10 | parameters: 11 | content-target: true 12 | - name: workflow-start-sample-approuter 13 | type: approuter.nodejs 14 | path: workflow-start-sample-approuter 15 | requires: 16 | - name: workflow-start-sample_html_repo_runtime 17 | - name: default_workflow 18 | - name: uaa_workflowstartform 19 | - name: default_portal 20 | - name: default_destination 21 | - name: default_connectivity 22 | parameters: 23 | disk-quota: 256M 24 | memory: 256M 25 | - name: workflow-start-sample_ui_deployer 26 | type: com.sap.application.content 27 | path: . 28 | requires: 29 | - name: workflow-start-sample_html_repo_host 30 | parameters: 31 | content-target: true 32 | build-parameters: 33 | build-result: resources 34 | requires: 35 | - artifacts: 36 | - startworkflow-content.zip 37 | name: startworkflow 38 | target-path: resources/ 39 | - artifacts: 40 | - taskui-content.zip 41 | name: taskui 42 | target-path: resources/ 43 | - name: startworkflow 44 | type: html5 45 | path: startworkflow 46 | build-parameters: 47 | builder: custom 48 | commands: 49 | - npm run build 50 | supported-platforms: [] 51 | - name: homepageflp 52 | type: com.sap.application.content 53 | path: homepageflp 54 | requires: 55 | - name: default_portal 56 | parameters: 57 | content-target: true 58 | service-key: 59 | config: 60 | content-endpoint: developer 61 | name: content-deploy-key 62 | - name: workflow-start-sample_html_repo_host 63 | - name: workflow-start-sample_ui_deployer 64 | - name: uaa_workflowstartform 65 | - name: default_workflow 66 | - name: taskui 67 | type: html5 68 | path: taskui 69 | build-parameters: 70 | builder: custom 71 | commands: 72 | - npm run build 73 | supported-platforms: [] 74 | resources: 75 | - name: default_workflow 76 | type: org.cloudfoundry.existing-service 77 | parameters: 78 | service: workflow 79 | service-plan: lite 80 | - name: workflow-start-sample_html_repo_runtime 81 | type: org.cloudfoundry.managed-service 82 | parameters: 83 | service: html5-apps-repo 84 | service-plan: app-runtime 85 | - name: workflow-start-sample_html_repo_host 86 | type: org.cloudfoundry.managed-service 87 | parameters: 88 | service: html5-apps-repo 89 | service-plan: app-host 90 | - name: uaa_workflowstartform 91 | type: org.cloudfoundry.managed-service 92 | parameters: 93 | path: ./xs-security.json 94 | service: xsuaa 95 | service-plan: application 96 | - name: default_portal 97 | type: org.cloudfoundry.managed-service 98 | parameters: 99 | service: portal 100 | service-plan: standard 101 | - name: default_connectivity 102 | type: org.cloudfoundry.existing-service 103 | parameters: 104 | service: connectivity 105 | service-plan: lite 106 | - name: default_destination 107 | type: org.cloudfoundry.existing-service 108 | parameters: 109 | service: destination 110 | service-plan: lite 111 | build-parameters: 112 | before-all: 113 | - builder: custom 114 | commands: 115 | - npm install 116 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/config/MailConfig.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.config; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Scanner; 6 | 7 | import org.apache.http.client.methods.CloseableHttpResponse; 8 | import org.apache.http.client.methods.HttpGet; 9 | import org.apache.http.impl.client.CloseableHttpClient; 10 | import org.apache.http.impl.client.HttpClients; 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.beans.factory.annotation.Value; 15 | import org.springframework.context.annotation.Configuration; 16 | 17 | import com.fasterxml.jackson.databind.ObjectMapper; 18 | import com.fasterxml.jackson.databind.node.ObjectNode; 19 | import com.sap.bpm.wfs.forms.adaptivecards.RemoteAccessException; 20 | import com.sap.bpm.wfs.forms.adaptivecards.util.HttpUtils; 21 | import com.sap.bpm.wfs.forms.adaptivecards.util.UaaUtils; 22 | 23 | @Configuration 24 | public class MailConfig { 25 | 26 | private static final Logger LOG = LoggerFactory.getLogger(MailConfig.class); 27 | 28 | @Autowired 29 | private VcapConfig vcapConfig; 30 | 31 | @Value("${mail.destination}") 32 | private String mailDestination; 33 | 34 | private String mailUser; 35 | private String mailPassword; 36 | 37 | public void updateCredentialsFromDestination() throws IllegalStateException, RemoteAccessException { 38 | String accessToken = UaaUtils.getDestinationAccessToken(vcapConfig); 39 | 40 | String destination = getDestination(accessToken); 41 | 42 | ObjectMapper mapper = new ObjectMapper(); 43 | try { 44 | ObjectNode destinationNode = (ObjectNode) mapper.readTree(destination); 45 | this.mailUser = destinationNode.path("mail.user").asText(); 46 | this.mailPassword = destinationNode.path("mail.password").asText(); 47 | } catch (IOException e) { 48 | throw new RemoteAccessException("Error while processing destination " + mailDestination, e); 49 | } 50 | } 51 | 52 | private String getDestination(String accessToken) throws IllegalStateException, RemoteAccessException { 53 | String destination = "{}"; 54 | String destinationAPI = vcapConfig.getDestinationRestUrl(); 55 | String destinationURL = destinationAPI + "/destination-configuration/v1/subaccountDestinations/" + mailDestination; 56 | 57 | LOG.info("Destination endpoint for destination {}: {}", mailDestination, destinationURL); 58 | 59 | HttpGet httpGet = new HttpGet(destinationURL); 60 | httpGet.setHeader("Authorization", "Bearer " + accessToken); 61 | 62 | try (CloseableHttpClient httpclient = HttpClients.createDefault(); 63 | CloseableHttpResponse response = httpclient.execute(httpGet); 64 | InputStream content = HttpUtils.getContent(response, "{}"); 65 | Scanner scanner = new Scanner(content, "utf-8")) { 66 | destination = scanner.useDelimiter("\\A").next(); 67 | } catch (IOException e) { 68 | throw new RemoteAccessException("Error while retrieving destination " + mailDestination, e); 69 | } 70 | return destination; 71 | } 72 | 73 | public String getMailUser() { 74 | return mailUser; 75 | } 76 | 77 | public String getMailPassword() { 78 | return mailPassword; 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/cardvalidation/OpenIdMetadata.java: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Copyright (c) Microsoft Corporation. 4 | // All rights reserved. 5 | // 6 | // This code is licensed under the MIT License. 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files(the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions : 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | //------------------------------------------------------------------------------ 27 | 28 | package com.sap.bpm.wfs.forms.adaptivecards.cardvalidation; 29 | 30 | import java.io.BufferedReader; 31 | import java.io.IOException; 32 | import java.io.InputStreamReader; 33 | import java.net.URL; 34 | 35 | import com.fasterxml.jackson.databind.JsonNode; 36 | import com.fasterxml.jackson.databind.ObjectMapper; 37 | 38 | /** 39 | * Represents an OpenID configuration. 40 | * 41 | * Original source at: https://github.com/OfficeDev/outlook-actionable-messages-java-token-validation 42 | */ 43 | public class OpenIdMetadata { 44 | 45 | private JsonNode config; 46 | 47 | /** 48 | * Constructor. 49 | * 50 | * @param url The URL to the Open ID configuration. 51 | */ 52 | public OpenIdMetadata(String url) throws IOException { 53 | getOpenIdConfiguration(url); 54 | } 55 | 56 | /** 57 | * Gets the URL of the JSON web key set in the configuration. 58 | * 59 | * @return String The URL of the JSON web key set. 60 | */ 61 | public String getJsonWebKeyUrl() { 62 | return config.path("jwks_uri").asText(); 63 | } 64 | 65 | /** 66 | * Gets the Open ID configuration. 67 | * 68 | * @param url The URL of the Open ID configuration. 69 | */ 70 | private void getOpenIdConfiguration(String url) throws IOException { 71 | config = getJsonFromUrl(url); 72 | } 73 | 74 | /** 75 | * Reads the JSON returned by the URL. 76 | * 77 | * @param url The URL to read the JSON from. 78 | * @return JsonNode The JSON object. 79 | */ 80 | private JsonNode getJsonFromUrl(String url) throws IOException { 81 | try (BufferedReader rd = new BufferedReader(new InputStreamReader(new URL(url).openStream()))) { 82 | StringBuilder sb = new StringBuilder(); 83 | int cp; 84 | 85 | while ((cp = rd.read()) != -1) { 86 | sb.append((char) cp); 87 | } 88 | 89 | ObjectMapper mapper = new ObjectMapper(); 90 | JsonNode json = mapper.readTree(sb.toString()); 91 | 92 | return json; 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /cf-insight-to-action-workflows-lp/README.md: -------------------------------------------------------------------------------- 1 | # Insight to Action Workflows using SAP Workflow Management 2 | ## Overview 3 | SAP Workflow Management has Process Visibility capability, enable Process Owners / Process Operators to gain real time insights into processes and insight to actions. This enalbe business to be notified by the system as and when exceptions occur in processes or SLAs are violated. Process Visiblity enable customers to define user centric and system centric actions based on certain conditions. Please read more about Process visibility insight to action capabilties in [SAP Help Portal](https://help.sap.com/viewer/62fd39fa3eae4046b23dba285e84bfd4/Cloud/en-US/55c6601f37f7499a9e9adba8ee845bdc.html). 4 | 5 | Process visibility enable customers to define process status and sub status based various life cylce statuses , custom status based on events or application attributes. Please read more about Proecss Status in [SAP Help Portal](https://help.sap.com/viewer/62fd39fa3eae4046b23dba285e84bfd4/Cloud/en-US/5466b3cc7bdd49c5a7e45c6fc8b9a285.html) 6 | 7 | This project contains two workflows which can be used in a Processs Visibility scenario as user centric and system centric actions. 8 | ![SolutionArch](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-insight-to-action-workflows-lp/images/solutionarchDiagram.png?raw=true) 9 | 10 | ## System Centric Action Workflow - Notify Process Administrator 11 | A system centric aciton in process visibility is triggered as and when a process / workflow instance has reached certain status or sub status configured by the customer.Customers can configure the various statuses where they need to be notified. 12 | ![systemCentricVisibilityConfiguration](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-insight-to-action-workflows-lp/images/systemCentricVisibilityConfiguration.png?raw=true) 13 | 14 | The notificaiton could also include tasks or creating tickets etc. The preconfigured workflow delviered with this package create a workflow task to a Process owner or Process Administartor depending on the Process status change. 15 | ![systemCentricWorkflow](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-insight-to-action-workflows-lp/images/systemCentricWorkflow.png?raw=true) 16 | 17 | ## User Centric Action Workflow - Restart Workflow 18 | A user centric action in process visibility enable a process operator with an action when the process / workflow instance has reached certain status or sub status configured by the customer. Restart Workflow action enalbe a process operator to restart a workflow instance which is in a critical status (for eg: failed or suspended). 19 | ![useractionvisibilityconfiguration](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-insight-to-action-workflows-lp/images/useractionvisibilityconfiguration.png?raw=true) 20 | 21 | Restart Workflow retrieve the existing workflow details and context data. Customers can enhance the script task to map the start payload to trigger a new workflow. The existing workflow will be cancelled using Workflow APIs. 22 | 23 | ![userCentricWorkflow](https://github.com/SAP/cloud-workflow-samples/blob/master/cf-insight-to-action-workflows-lp/images/userCentricWorkflow.png?raw=true) 24 | 25 | ## Build and Deploy the Workflow Project 26 | 1. Unzip InsightToActionWorkflow.zip under the folder Workflow Modules into your local folder 27 | 2. Import the project into SAP Business Application Studio. 28 | 3. [Build the project and deploy the archive](https://help.sap.com/viewer/9d1db9835307451daa8c930fbd9ab264/Cloud/en-US/97ef204c568c4496917139cee61224a6.html) to your business technology platform account. 29 | 30 | Please refer the setup and configuration guide of the content in SAP API Business Hub 31 | 32 | -------------------------------------------------------------------------------- /cf-outlook-integration-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.sap.bpm.wfs 7 | wfs-forms-adaptive-cards 8 | 0.0.1-SNAPSHOT 9 | 10 | 11 | org.springframework.boot 12 | spring-boot-starter-parent 13 | 1.5.21.RELEASE 14 | 15 | 16 | 17 | 2.12.1 18 | 19 | 20 | war 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | org.apache.tomcat.embed 29 | tomcat-embed-websocket 30 | 31 | 32 | 33 | 34 | org.apache.httpcomponents 35 | httpclient 36 | 37 | 38 | javax.servlet 39 | javax.servlet-api 40 | provided 41 | 42 | 43 | com.schibsted.spt.data 44 | jslt 45 | 0.1.8 46 | 47 | 48 | com.fasterxml.jackson.core 49 | jackson-core 50 | ${jackson.version} 51 | 52 | 53 | com.fasterxml.jackson.core 54 | jackson-annotations 55 | ${jackson.version} 56 | 57 | 58 | com.fasterxml.jackson.core 59 | jackson-databind 60 | ${jackson.version} 61 | 62 | 63 | com.sun.mail 64 | javax.mail 65 | 1.6.2 66 | 67 | 68 | com.nimbusds 69 | oauth2-oidc-sdk 70 | 5.17.1 71 | 72 | 73 | org.slf4j 74 | slf4j-api 75 | 1.7.12 76 | provided 77 | 78 | 79 | 80 | 81 | 82 | org.apache.maven.plugins 83 | maven-compiler-plugin 84 | 85 | 1.8 86 | 1.8 87 | 88 | 89 | 90 | org.springframework.boot 91 | spring-boot-maven-plugin 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /collaboration-sample/usertasks/controller/approvals.controller.js: -------------------------------------------------------------------------------- 1 | sap.ui.define([ 2 | "sap/ui/core/mvc/Controller", 3 | "sap/m/MessageToast" 4 | ], function(Controller, MessageToast) { 5 | "use strict"; 6 | 7 | return Controller.extend("com.sap.cloud.workflow.samples.audit.controller.approvals", { 8 | 9 | onAfterRendering: function() { 10 | this.initJamWidget(); 11 | }, 12 | 13 | initJamWidget: function() { 14 | 15 | this.getJamAccessToken().then(function(token) { 16 | 17 | var contentProperty = this.getOwnerComponent().getModel("prop"); 18 | var contentItemType = contentProperty.getProperty("/ContentItemType"); 19 | var contentId = contentProperty.getProperty("/Id"); 20 | var jamWidgetOptions = { 21 | type: "content_item", 22 | avatar: true, 23 | faces: true, 24 | live_update: true, 25 | is_sso: true, 26 | content_id: contentId, 27 | content_type: contentItemType, 28 | max_items: "7", 29 | mobile_mode: true, 30 | post_mode: "inline", 31 | reply_mode: "inline", 32 | single_use_token: token 33 | }; 34 | 35 | /*globals sapjam:true*/ 36 | this.boostrapJam().then(function() { 37 | if (sapjam && sapjam.feedWidget) { 38 | var configModel = new sap.ui.model.json.JSONModel(); 39 | configModel.loadData("/html5apps/samplecollaboration/appstartui/configuration/configuration.json", null, false); 40 | var jamConfig = configModel.getData().SAPJamConfigurations; 41 | 42 | var containerID = this.getView().createId("jamContainer"); 43 | $("#" + containerID).empty(); 44 | sapjam.feedWidget.init(jamConfig.jamAccountFeedEndpoint, "single_use_token"); 45 | sapjam.feedWidget.create(containerID, jamWidgetOptions); 46 | } else { 47 | MessageToast.show("Failed to bootstrap JAM feed."); 48 | } 49 | }.bind(this)).fail(function() { 50 | MessageToast.show("Failed to bootstrap JAM feed."); 51 | }); 52 | }.bind(this)).fail(function() { 53 | MessageToast.show("Failed to get Jam access token."); 54 | }); 55 | }, 56 | 57 | getJamAccessToken: function() { 58 | var oDeferred = $.Deferred(); 59 | $.ajax({ 60 | url: "/html5apps/samplecollaboration/sap_jam_odata/v1/single_use_tokens", 61 | method: "POST", 62 | success: function(result) { 63 | var tokenNode = $(result).find("single_use_token"); 64 | if (tokenNode) { 65 | var token = tokenNode.attr("id"); 66 | oDeferred.resolve(token); 67 | } else { 68 | oDeferred.reject(result); 69 | } 70 | }, 71 | error: function(error, e2, e3) { 72 | oDeferred.reject(e3); 73 | } 74 | }); 75 | 76 | return oDeferred; 77 | }, 78 | 79 | urlFormater: function(value) { 80 | // the value is the document ID 81 | if (value) { 82 | var configModel = new sap.ui.model.json.JSONModel(); 83 | configModel.loadData("/html5apps/samplecollaboration/appstartui/configuration/configuration.json", null, false); 84 | var jamConfig = configModel.getData().SAPJamConfigurations; 85 | 86 | return jamConfig.jamBaseURL + "/groups/" + jamConfig.jamGroupID + "/documents/" + value; 87 | } else { 88 | return value; 89 | } 90 | }, 91 | 92 | boostrapJam: function() { 93 | var oDeferred = $.Deferred(); 94 | var configModel = new sap.ui.model.json.JSONModel(); 95 | configModel.loadData("/html5apps/samplecollaboration/appstartui/configuration/configuration.json", null, false); 96 | var jamConfig = configModel.getData().SAPJamConfigurations; 97 | 98 | $.ajax({ 99 | url: jamConfig.jamFeedBootstrapUrl, 100 | dataType: "script", 101 | async: false, 102 | success: function(result) { 103 | oDeferred.resolve(result); 104 | }, 105 | error: function(error) { 106 | oDeferred.reject(error); 107 | } 108 | }); 109 | return oDeferred; 110 | } 111 | 112 | }); 113 | }); 114 | -------------------------------------------------------------------------------- /cf-workflowmanagement-flp/WFMFLP/portal-site/CommonDataModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "_version": "3.0.0", 3 | "identification": { 4 | "id": "27264e09-90a0-48ac-831f-f1578ca0407f-1568968840761", 5 | "entityType": "bundle" 6 | }, 7 | "payload": { 8 | "catalogs": [{ 9 | "_version": "3.0.0", 10 | "identification": { 11 | "id": "defaultCatalogId", 12 | "title": "{{title}}", 13 | "entityType": "catalog", 14 | "i18n": "i18n/defaultCatalogId.properties" 15 | }, 16 | "payload": { 17 | "viz": [{ 18 | "id": "sap.pv.instances", 19 | "vizId": "pv-showInstances" 20 | }, { 21 | "id": "sap.pv.ovp", 22 | "vizId": "pv-showScenarioOverview" 23 | }] 24 | } 25 | }], 26 | "groups": [{ 27 | "_version": "3.0.0", 28 | "identification": { 29 | "id": "business-rules", 30 | "title": "Business Rules", 31 | "entityType": "group" 32 | }, 33 | "payload": { 34 | "viz": [{ 35 | "id": "sap.rule.manageprojects-0-1589952114451", 36 | "appId": "sap.rule.manageprojects", 37 | "vizId": "BusinessRules-ManageRulesProjects" 38 | }] 39 | } 40 | }, { 41 | "_version": "3.0.0", 42 | "identification": { 43 | "id": "workflow", 44 | "title": "{{title}}", 45 | "entityType": "group", 46 | "i18n": "i18n/workflow.properties" 47 | }, 48 | "payload": { 49 | "viz": [{ 50 | "id": "cross.fnd.fiori.inbox-0-1602342157475", 51 | "appId": "cross.fnd.fiori.inbox", 52 | "vizId": "WorkflowTask-MyInboxWithSubstitution" 53 | }, { 54 | "id": "com.sap.bpm.monitorworkflow-2-1568986171400", 55 | "appId": "com.sap.bpm.monitorworkflow", 56 | "vizId": "bpmworkflowmonitor-DisplayInstances" 57 | }, { 58 | "id": "com.sap.bpm.monitorworkflow-1-1568986171400", 59 | "appId": "com.sap.bpm.monitorworkflow", 60 | "vizId": "bpmworkflowmonitor-DisplayDefinitions" 61 | }] 62 | } 63 | }, { 64 | "_version": "3.0.0", 65 | "identification": { 66 | "id": "processvisibility", 67 | "title": "{{title}}", 68 | "entityType": "group", 69 | "i18n": "i18n/processvisibility.properties" 70 | }, 71 | "payload": { 72 | "viz": [{ 73 | "id": "sap.pv.configurescenarios-0-1568986171400", 74 | "appId": "sap.pv.configurescenarios", 75 | "vizId": "pv-configurescenarios" 76 | }, { 77 | "id": "sap.pv.monitorscenarios-1-1568986171400", 78 | "appId": "sap.pv.monitorscenarios", 79 | "vizId": "pv-monitorscenarios" 80 | }, { 81 | "id": "sap.pv.eventacquisition-2-1568986171400", 82 | "appId": "sap.pv.eventacquisition", 83 | "vizId": "pv-eventacquisition" 84 | }, { 85 | "id": "sap.pv.processworkspace-3-1568986171400", 86 | "appId": "sap.pv.processworkspace", 87 | "vizId": "pv-processworkspace" 88 | }] 89 | } 90 | }], 91 | "sites": [{ 92 | "_version": "3.0.0", 93 | "identification": { 94 | "id": "65af0ce1-4cd7-4963-8688-db605e5d114e-1568968840761", 95 | "entityType": "site", 96 | "title": "SAP Fiori launchpad site on Cloud Foundry", 97 | "description": "SAP Fiori launchpad site on Cloud Foundry, deployed from SAP Web IDE" 98 | }, 99 | "payload": { 100 | "config": { 101 | "ushellConfig": { 102 | "renderers": { 103 | "fiori2": { 104 | "componentData": { 105 | "config": { 106 | "applications": { 107 | "Shell-home": {} 108 | }, 109 | "enableSearch": false, 110 | "enablePersonalization": true, 111 | "enableSetTheme": true, 112 | "enableSetLanguage": true 113 | } 114 | } 115 | } 116 | } 117 | } 118 | }, 119 | "groupsOrder": ["business-rules", "workflow", "processvisibility"], 120 | "sap.cloud.portal": { 121 | "config": { 122 | "theme.id": "sap_fiori_3", 123 | "theme.active": ["sap_fiori_3", "sap_belize_hcb", "sap_belize_hcw"], 124 | "ui5VersionNumber": "1.76.0" 125 | } 126 | } 127 | } 128 | }] 129 | } 130 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/startworkflow/webapp/view/app.view.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | </OverflowToolbar> 13 | </headerToolbar> 14 | <content> 15 | <f:SimpleForm maxContainerCols="2" editable="true" layout="ResponsiveGridLayout"> 16 | <Label text="Full Name"/> 17 | <Input value="{/Requester/Name}"/> 18 | <Label text="Email Address"/> 19 | <Input value="{/Requester/Email}"/> 20 | <Label text="User Id"/> 21 | <Input value="{/Requester/UserId}"/> 22 | </f:SimpleForm> 23 | </content> 24 | </Panel> 25 | <Panel width="auto" class="sapUiResponsiveMargin" accessibleRole="Region"> 26 | <headerToolbar> 27 | <OverflowToolbar> 28 | <Title text="Investment Details"/> 29 | </OverflowToolbar> 30 | </headerToolbar> 31 | <content> 32 | <f:SimpleForm maxContainerCols="2" editable="true" layout="ResponsiveGridLayout"> 33 | <Label text="Request Id"/> 34 | <Input value="{/RequestId}"/> 35 | <Label text="Title"/> 36 | <Input value="{/Title}"/> 37 | <Label text="Type"/> 38 | <ComboBox> 39 | <items> 40 | <core:Item key="Software" text="Software" /> 41 | <core:Item key="Equipment" text="Equipment" /> 42 | <core:Item key="Service" text="Service" /> 43 | <core:Item key="Building" text="Building" /> 44 | </items> 45 | </ComboBox> 46 | <Label text="Country"/> 47 | <Input value="{/Investment/Country}"/> 48 | <Label text="Division"/> 49 | <Input value="{/Investment/Division}"/> 50 | <Label text="Description"/> 51 | <Input value="{/Investment/Description}"/> 52 | <Label text="CAPEX"/> 53 | <Input value="{/Investment/CAPEX}"/> 54 | <Label text="OPEX"/> 55 | <Input value="{/Investment/OPEX}"/> 56 | <Label text="Total Cost"/> 57 | <Input value="{/Investment/TotalCost}"/> 58 | </f:SimpleForm> 59 | </content> 60 | </Panel> 61 | </content> 62 | <footer> 63 | <Toolbar id="actionsToolbar"> 64 | <ToolbarSpacer/> 65 | <Button id="startworkflowbtn" text="Start Workflow" type="Accept" press="onStartPress"/> 66 | </Toolbar> 67 | </footer> 68 | </Page> 69 | </pages> 70 | </App> 71 | </Shell> 72 | </mvc:View> 73 | -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/templates/SampleCapitalExpenditureApprovalProcess.proctemplate: -------------------------------------------------------------------------------- 1 | { 2 | "id": "samplecapexapprovalprocess", 3 | "name": "Sample Capital Expenditure Approval Process", 4 | "documentation": "Sample capital expenditure approval process template.", 5 | "contentVersion": "2.0", 6 | "stepDefinitions": [{ 7 | "id": "com.sap.bpm.process.start", 8 | "name": "Start" 9 | }, { 10 | "reference": "/workflows/Approval.workflow", 11 | "icon": "sap-icon://payment-approval", 12 | "borderColor": "#d58215", 13 | "inputParameters": [{ 14 | "id": "role", 15 | "name": "Role Name", 16 | "documentation": "Role Name of the Approver", 17 | "type": "string", 18 | "predefinedValue": "Local Manager", 19 | "targetVariable": "${context.role}" 20 | }, { 21 | "id": "approvalstep", 22 | "name": "Approval Step", 23 | "documentation": "Approval step name which will be as used to evaluate Business Rules", 24 | "type": "string", 25 | "predefinedValue": "LocalManager", 26 | "targetVariable": "${context.approvalstep}" 27 | }] 28 | }, { 29 | "reference": "/workflows/Initialization.workflow", 30 | "icon": "sap-icon://begin", 31 | "borderColor": "#336288", 32 | "constraints": { 33 | "occurrence": { 34 | "min": 1 35 | } 36 | } 37 | }, { 38 | "id": "com.sap.bpm.process.end", 39 | "name": "End" 40 | }], 41 | "attributes": [{ 42 | "id": "RequestId", 43 | "label": "Request Id", 44 | "type": "string", 45 | "value": "${context.RequestId}" 46 | }, { 47 | "id": "TotalCost", 48 | "label": "Total Cost", 49 | "type": "string", 50 | "value": "${context.Investment.TotalCost}" 51 | }, { 52 | "id": "InvestmentType", 53 | "label": "Investment Type", 54 | "type": "string", 55 | "value": "${context.Investment.Type}" 56 | }, { 57 | "id": "CAPEX", 58 | "label": "CAPEX", 59 | "type": "string", 60 | "value": "${context.Investment.CAPEX}" 61 | }, { 62 | "id": "OPEX", 63 | "label": "OPEX", 64 | "type": "string", 65 | "value": "${context.Investment.OPEX}" 66 | }, { 67 | "id": "ROI", 68 | "label": "ROI", 69 | "type": "string", 70 | "value": "${context.Investment.ROI}" 71 | }, { 72 | "id": "IRR", 73 | "label": "IRR", 74 | "type": "string", 75 | "value": "${context.Investment.IRR}" 76 | }, { 77 | "id": "Country", 78 | "label": "Country/Region", 79 | "type": "string", 80 | "value": "${context.Investment.Country}" 81 | }, { 82 | "id": "Currency", 83 | "label": "Currency", 84 | "type": "string", 85 | "value": "${context.Investment.Currency}" 86 | }, { 87 | "id": "BusinessUnit", 88 | "label": "Business Unit", 89 | "type": "string", 90 | "value": "${context.Investment.BusinessUnit}" 91 | }, { 92 | "id": "EnergyEfficiency", 93 | "label": "Energy Efficiency", 94 | "type": "string", 95 | "value": "${context.Sustainability.EnergyEfficiency}" 96 | }, { 97 | "id": "CO2Efficiency", 98 | "label": "CO2 Efficiency", 99 | "type": "string", 100 | "value": "${context.Sustainability.CO2Efficiency}" 101 | }, { 102 | "id": "EnergyCostSavings", 103 | "label": "Energy Cost Savings", 104 | "type": "string", 105 | "value": "${context.Sustainability.EnergyCostSavings}" 106 | }, { 107 | "id": "WaterSavings", 108 | "label": "Water Savings", 109 | "type": "string", 110 | "value": "${context.Sustainability.WaterSavings}" 111 | }, { 112 | "id": "ApprovalStatus", 113 | "label": "Status of the Approval Workflow", 114 | "type": "string", 115 | "value": "${context.internal.approvalStatus}" 116 | }], 117 | "contextMapping": { 118 | "inputContextMapping": [{ 119 | "sourceExpression": "${context.Investment}" 120 | }, { 121 | "sourceExpression": "${context.Sustainability}" 122 | }, { 123 | "sourceExpression": "${context.Requester}" 124 | }, { 125 | "sourceExpression": "${context.RequestId}" 126 | }, { 127 | "sourceExpression": "${context.internal}" 128 | }, { 129 | "sourceExpression": "${context.Title}" 130 | }] 131 | }, 132 | "configurations": { 133 | "enablePrincipalPropagation": false 134 | } 135 | } -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/config/VcapConfig.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards.config; 2 | 3 | import java.io.IOException; 4 | import java.util.Base64; 5 | 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | import com.fasterxml.jackson.databind.ObjectMapper; 10 | import com.fasterxml.jackson.databind.node.ObjectNode; 11 | 12 | @Configuration 13 | public class VcapConfig { 14 | 15 | String vcapApp = System.getenv("VCAP_APPLICATION"); 16 | String vcapServices = System.getenv("VCAP_SERVICES"); 17 | 18 | @Bean 19 | public ObjectNode vcapApplication() { 20 | String vcapApp = System.getenv("VCAP_APPLICATION"); 21 | if (vcapApp == null) vcapApp = "{}"; 22 | 23 | ObjectMapper mapper = new ObjectMapper(); 24 | try { 25 | return (ObjectNode) mapper.readTree(vcapApp); 26 | } catch (IOException e) { 27 | e.printStackTrace(); 28 | throw new IllegalStateException("Unable to get VCAP_APPLICATION environment variables."); 29 | } 30 | } 31 | 32 | @Bean 33 | public ObjectNode vcapServices() { 34 | String vcapServices = System.getenv("VCAP_SERVICES"); 35 | if (vcapServices == null) vcapServices = "{}"; 36 | 37 | ObjectMapper mapper = new ObjectMapper(); 38 | try { 39 | return (ObjectNode) mapper.readTree(vcapServices); 40 | } catch (IOException e) { 41 | throw new IllegalStateException("Unable to get VCAP_SERVICES environment variables."); 42 | } 43 | } 44 | 45 | // Workflow 46 | 47 | public String getWorkflowRestUrl() { 48 | return vcapServices().path("workflow").path(0).path("credentials").path("endpoints").path("workflow_rest_url").asText(); 49 | } 50 | 51 | public String getWorkflowUaaTokenEndpoint() { 52 | return vcapServices().path("workflow").path(0).path("credentials").path("uaa").path("url").asText() + "/oauth/token"; 53 | } 54 | 55 | public String getWorkflowUaaClientId() { 56 | return vcapServices().path("workflow").path(0).path("credentials").path("uaa").path("clientid").asText(); 57 | } 58 | 59 | public String getWorkflowUaaClientSecret() { 60 | return vcapServices().path("workflow").path(0).path("credentials").path("uaa").path("clientsecret").asText(); 61 | } 62 | 63 | public String getWorkflowUaaCredentials() { 64 | String clientId = getWorkflowUaaClientId(); 65 | String clientSecret = getWorkflowUaaClientSecret(); 66 | return getCredentials(clientId, clientSecret); 67 | } 68 | 69 | // Destination 70 | 71 | public String getDestinationRestUrl() { 72 | return vcapServices().path("destination").path(0).path("credentials").path("uri").asText(); 73 | } 74 | 75 | public String getDestinationUaaTokenEndpoint() { 76 | return vcapServices().path("destination").path(0).path("credentials").path("url").asText() + "/oauth/token"; 77 | } 78 | 79 | public String getDestinationUaaClientId() { 80 | return vcapServices().path("destination").path(0).path("credentials").path("clientid").asText(); 81 | } 82 | 83 | public String getDestinationUaaClientSecret() { 84 | return vcapServices().path("destination").path(0).path("credentials").path("clientsecret").asText(); 85 | } 86 | 87 | public String getDestinationUaaCredentials() { 88 | String clientId = getDestinationUaaClientId(); 89 | String clientSecret = getDestinationUaaClientSecret(); 90 | return getCredentials(clientId, clientSecret); 91 | } 92 | 93 | /* 94 | * Returns a base64-encoded BASIC Authorization header value using client ID and secret. 95 | */ 96 | private String getCredentials(String clientId, String clientSecret) { 97 | String clientIdAndSecret = clientId + ":" + clientSecret; 98 | return new String("Basic " + Base64.getEncoder().encodeToString(clientIdAndSecret.getBytes())); 99 | } 100 | } -------------------------------------------------------------------------------- /cf-capexapprovalprocess-sample/CapEx/workflows/Initialization.workflow: -------------------------------------------------------------------------------- 1 | { 2 | "contents": { 3 | "0796d39f-28cc-4238-b2f7-5da34100c93f": { 4 | "classDefinition": "com.sap.bpm.wfs.Model", 5 | "id": "initialization", 6 | "subject": "Initialization", 7 | "name": "Initialization", 8 | "documentation": "Initialization", 9 | "lastIds": "566c1b80-e635-4c0e-bb15-a3fa2e2ce958", 10 | "events": { 11 | "f29f1d6b-fd9b-4ef9-b682-9a5a1c20c479": { 12 | "name": "Start Initialization Step" 13 | }, 14 | "0ceb1f0d-bab5-4bb1-94ee-40146c4f70da": { 15 | "name": "End Initialization Step" 16 | } 17 | }, 18 | "activities": { 19 | "b3157722-dc62-405a-b6bd-3cd084a7092c": { 20 | "name": "Initializate Context" 21 | } 22 | }, 23 | "sequenceFlows": { 24 | "db1c98f5-0af5-495c-bb22-a15c9eb1c9d9": { 25 | "name": "SequenceFlow1" 26 | }, 27 | "ce6fc9ec-bef8-4e52-a25d-e728903973ed": { 28 | "name": "SequenceFlow2" 29 | } 30 | }, 31 | "diagrams": { 32 | "f00e35f8-69c3-4867-8058-38ff9246d8a5": {} 33 | } 34 | }, 35 | "f29f1d6b-fd9b-4ef9-b682-9a5a1c20c479": { 36 | "classDefinition": "com.sap.bpm.wfs.StartEvent", 37 | "id": "startevent1", 38 | "name": "Start Initialization Step" 39 | }, 40 | "0ceb1f0d-bab5-4bb1-94ee-40146c4f70da": { 41 | "classDefinition": "com.sap.bpm.wfs.EndEvent", 42 | "id": "endevent1", 43 | "name": "End Initialization Step" 44 | }, 45 | "db1c98f5-0af5-495c-bb22-a15c9eb1c9d9": { 46 | "classDefinition": "com.sap.bpm.wfs.SequenceFlow", 47 | "id": "sequenceflow1", 48 | "name": "SequenceFlow1", 49 | "sourceRef": "f29f1d6b-fd9b-4ef9-b682-9a5a1c20c479", 50 | "targetRef": "b3157722-dc62-405a-b6bd-3cd084a7092c" 51 | }, 52 | "f00e35f8-69c3-4867-8058-38ff9246d8a5": { 53 | "classDefinition": "com.sap.bpm.wfs.ui.Diagram", 54 | "symbols": { 55 | "5ec94bc6-c8be-407c-9d04-1d731bd1dc32": {}, 56 | "c924b541-d4a8-42eb-8918-43a47bf31c63": {}, 57 | "9cf2571e-d26a-43b7-b7a6-7e6809f46888": {}, 58 | "985c6478-05a6-4b23-8f5a-269caacc48a8": {}, 59 | "195db388-fb7a-4904-b3e2-edb4fc9f6d54": {} 60 | } 61 | }, 62 | "5ec94bc6-c8be-407c-9d04-1d731bd1dc32": { 63 | "classDefinition": "com.sap.bpm.wfs.ui.StartEventSymbol", 64 | "x": 100, 65 | "y": 100, 66 | "width": 32, 67 | "height": 32, 68 | "object": "f29f1d6b-fd9b-4ef9-b682-9a5a1c20c479" 69 | }, 70 | "c924b541-d4a8-42eb-8918-43a47bf31c63": { 71 | "classDefinition": "com.sap.bpm.wfs.ui.EndEventSymbol", 72 | "x": 340, 73 | "y": 100, 74 | "width": 35, 75 | "height": 35, 76 | "object": "0ceb1f0d-bab5-4bb1-94ee-40146c4f70da" 77 | }, 78 | "9cf2571e-d26a-43b7-b7a6-7e6809f46888": { 79 | "classDefinition": "com.sap.bpm.wfs.ui.SequenceFlowSymbol", 80 | "points": "116,116.375 236.24147286593848,116.375", 81 | "sourceSymbol": "5ec94bc6-c8be-407c-9d04-1d731bd1dc32", 82 | "targetSymbol": "985c6478-05a6-4b23-8f5a-269caacc48a8", 83 | "object": "db1c98f5-0af5-495c-bb22-a15c9eb1c9d9" 84 | }, 85 | "566c1b80-e635-4c0e-bb15-a3fa2e2ce958": { 86 | "classDefinition": "com.sap.bpm.wfs.LastIDs", 87 | "sequenceflow": 2, 88 | "startevent": 1, 89 | "endevent": 1, 90 | "scripttask": 1 91 | }, 92 | "b3157722-dc62-405a-b6bd-3cd084a7092c": { 93 | "classDefinition": "com.sap.bpm.wfs.ScriptTask", 94 | "reference": "/scripts/Initialization/Initialization.js", 95 | "id": "scripttask1", 96 | "name": "Initializate Context" 97 | }, 98 | "985c6478-05a6-4b23-8f5a-269caacc48a8": { 99 | "classDefinition": "com.sap.bpm.wfs.ui.ScriptTaskSymbol", 100 | "x": 186.24147286593848, 101 | "y": 86.75, 102 | "width": 100, 103 | "height": 60, 104 | "object": "b3157722-dc62-405a-b6bd-3cd084a7092c" 105 | }, 106 | "ce6fc9ec-bef8-4e52-a25d-e728903973ed": { 107 | "classDefinition": "com.sap.bpm.wfs.SequenceFlow", 108 | "id": "sequenceflow2", 109 | "name": "SequenceFlow2", 110 | "sourceRef": "b3157722-dc62-405a-b6bd-3cd084a7092c", 111 | "targetRef": "0ceb1f0d-bab5-4bb1-94ee-40146c4f70da" 112 | }, 113 | "195db388-fb7a-4904-b3e2-edb4fc9f6d54": { 114 | "classDefinition": "com.sap.bpm.wfs.ui.SequenceFlowSymbol", 115 | "points": "236.24147286593848,117.125 357.5,117.125", 116 | "sourceSymbol": "985c6478-05a6-4b23-8f5a-269caacc48a8", 117 | "targetSymbol": "c924b541-d4a8-42eb-8918-43a47bf31c63", 118 | "object": "ce6fc9ec-bef8-4e52-a25d-e728903973ed" 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /cf-workflowstart-sample/approvals/workflows/capexapproval.workflow: -------------------------------------------------------------------------------- 1 | { 2 | "contents": { 3 | "ff8a97f7-7981-4cce-83b3-98e077992be8": { 4 | "classDefinition": "com.sap.bpm.wfs.Model", 5 | "id": "capexapproval", 6 | "subject": "capexapproval", 7 | "name": "capexapproval", 8 | "documentation": "", 9 | "lastIds": "62d7f4ed-4063-4c44-af8b-39050bd44926", 10 | "events": { 11 | "11a9b5ee-17c0-4159-9bbf-454dcfdcd5c3": { 12 | "name": "StartEvent1" 13 | }, 14 | "2798f4e7-bc42-4fad-a248-159095a2f40a": { 15 | "name": "EndEvent1" 16 | } 17 | }, 18 | "activities": { 19 | "bdc22b71-7b04-4c5b-9292-8552960b8966": { 20 | "name": "Capex Approval" 21 | } 22 | }, 23 | "sequenceFlows": { 24 | "c6b99f32-5fe6-4ab6-b60a-80fba1b9ae0f": { 25 | "name": "SequenceFlow1" 26 | }, 27 | "0dd6b9ff-0142-40fb-b448-a58707444a77": { 28 | "name": "SequenceFlow2" 29 | } 30 | }, 31 | "diagrams": { 32 | "42fa7a2d-c526-4a02-b3ba-49b5168ba644": {} 33 | } 34 | }, 35 | "11a9b5ee-17c0-4159-9bbf-454dcfdcd5c3": { 36 | "classDefinition": "com.sap.bpm.wfs.StartEvent", 37 | "id": "startevent1", 38 | "name": "StartEvent1" 39 | }, 40 | "2798f4e7-bc42-4fad-a248-159095a2f40a": { 41 | "classDefinition": "com.sap.bpm.wfs.EndEvent", 42 | "id": "endevent1", 43 | "name": "EndEvent1" 44 | }, 45 | "bdc22b71-7b04-4c5b-9292-8552960b8966": { 46 | "classDefinition": "com.sap.bpm.wfs.UserTask", 47 | "subject": "Capex Approval for ${context.RequestId}", 48 | "description": "Approve capital expenditure request", 49 | "priority": "MEDIUM", 50 | "isHiddenInLogForParticipant": false, 51 | "userInterface": "sapui5://sapdemobpmtaskui/sap.demo.bpm.taskui", 52 | "recipientUsers": "${info.startedBy}", 53 | "id": "usertask1", 54 | "name": "Capex Approval" 55 | }, 56 | "c6b99f32-5fe6-4ab6-b60a-80fba1b9ae0f": { 57 | "classDefinition": "com.sap.bpm.wfs.SequenceFlow", 58 | "id": "sequenceflow1", 59 | "name": "SequenceFlow1", 60 | "sourceRef": "11a9b5ee-17c0-4159-9bbf-454dcfdcd5c3", 61 | "targetRef": "bdc22b71-7b04-4c5b-9292-8552960b8966" 62 | }, 63 | "0dd6b9ff-0142-40fb-b448-a58707444a77": { 64 | "classDefinition": "com.sap.bpm.wfs.SequenceFlow", 65 | "id": "sequenceflow2", 66 | "name": "SequenceFlow2", 67 | "sourceRef": "bdc22b71-7b04-4c5b-9292-8552960b8966", 68 | "targetRef": "2798f4e7-bc42-4fad-a248-159095a2f40a" 69 | }, 70 | "42fa7a2d-c526-4a02-b3ba-49b5168ba644": { 71 | "classDefinition": "com.sap.bpm.wfs.ui.Diagram", 72 | "symbols": { 73 | "df898b52-91e1-4778-baad-2ad9a261d30e": {}, 74 | "53e54950-7757-4161-82c9-afa7e86cff2c": {}, 75 | "6bb141da-d485-4317-93b8-e17711df4c32": {}, 76 | "e1a8e7c5-7148-472c-b86a-e12dca734eb1": {}, 77 | "03ea6a20-b5df-4c76-b354-7111fd290fd6": {} 78 | } 79 | }, 80 | "df898b52-91e1-4778-baad-2ad9a261d30e": { 81 | "classDefinition": "com.sap.bpm.wfs.ui.StartEventSymbol", 82 | "x": 100, 83 | "y": 100, 84 | "width": 32, 85 | "height": 32, 86 | "object": "11a9b5ee-17c0-4159-9bbf-454dcfdcd5c3" 87 | }, 88 | "53e54950-7757-4161-82c9-afa7e86cff2c": { 89 | "classDefinition": "com.sap.bpm.wfs.ui.EndEventSymbol", 90 | "x": 340, 91 | "y": 100, 92 | "width": 35, 93 | "height": 35, 94 | "object": "2798f4e7-bc42-4fad-a248-159095a2f40a" 95 | }, 96 | "6bb141da-d485-4317-93b8-e17711df4c32": { 97 | "classDefinition": "com.sap.bpm.wfs.ui.SequenceFlowSymbol", 98 | "points": "116,116.375 236.24147286593848,116.375", 99 | "sourceSymbol": "df898b52-91e1-4778-baad-2ad9a261d30e", 100 | "targetSymbol": "e1a8e7c5-7148-472c-b86a-e12dca734eb1", 101 | "object": "c6b99f32-5fe6-4ab6-b60a-80fba1b9ae0f" 102 | }, 103 | "e1a8e7c5-7148-472c-b86a-e12dca734eb1": { 104 | "classDefinition": "com.sap.bpm.wfs.ui.UserTaskSymbol", 105 | "x": 186.24147286593848, 106 | "y": 86.75, 107 | "width": 100, 108 | "height": 60, 109 | "object": "bdc22b71-7b04-4c5b-9292-8552960b8966" 110 | }, 111 | "03ea6a20-b5df-4c76-b354-7111fd290fd6": { 112 | "classDefinition": "com.sap.bpm.wfs.ui.SequenceFlowSymbol", 113 | "points": "236.24147286593848,117.125 357.5,117.125", 114 | "sourceSymbol": "e1a8e7c5-7148-472c-b86a-e12dca734eb1", 115 | "targetSymbol": "53e54950-7757-4161-82c9-afa7e86cff2c", 116 | "object": "0dd6b9ff-0142-40fb-b448-a58707444a77" 117 | }, 118 | "62d7f4ed-4063-4c44-af8b-39050bd44926": { 119 | "classDefinition": "com.sap.bpm.wfs.LastIDs", 120 | "sequenceflow": 2, 121 | "startevent": 1, 122 | "endevent": 1, 123 | "usertask": 1 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /cf-outlook-integration-sample/src/main/java/com/sap/bpm/wfs/forms/adaptivecards/TaskRetriever.java: -------------------------------------------------------------------------------- 1 | package com.sap.bpm.wfs.forms.adaptivecards; 2 | 3 | 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.util.Scanner; 7 | 8 | import org.apache.http.client.methods.CloseableHttpResponse; 9 | import org.apache.http.client.methods.HttpGet; 10 | import org.apache.http.impl.client.CloseableHttpClient; 11 | import org.apache.http.impl.client.HttpClients; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.context.annotation.Bean; 16 | import org.springframework.context.annotation.Configuration; 17 | 18 | import com.fasterxml.jackson.databind.ObjectMapper; 19 | import com.fasterxml.jackson.databind.node.ObjectNode; 20 | import com.sap.bpm.wfs.forms.adaptivecards.config.VcapConfig; 21 | import com.sap.bpm.wfs.forms.adaptivecards.util.HttpUtils; 22 | import com.sap.bpm.wfs.forms.adaptivecards.util.Task; 23 | import com.sap.bpm.wfs.forms.adaptivecards.util.UaaUtils; 24 | 25 | /** 26 | * Retrieves a single task by id and returns basic task information along with relevant context data and form data. 27 | */ 28 | @Configuration 29 | public class TaskRetriever { 30 | 31 | private static final Logger LOG = LoggerFactory.getLogger(TaskRetriever.class); 32 | 33 | @Autowired 34 | private VcapConfig vcapConfig; 35 | 36 | @Bean 37 | public TaskRetriever getTaskRetriever() { 38 | return this; 39 | } 40 | 41 | public Task retrieveTask(ObjectNode taskNode) throws IllegalStateException, RemoteAccessException { 42 | LOG.info("Retrieving task {}...", taskNode.path("id").asText()); 43 | 44 | String taskId = taskNode.path("id").asText(); 45 | 46 | String accessToken = UaaUtils.getWorkflowAccessToken(vcapConfig); 47 | String workflowAPI = vcapConfig.getWorkflowRestUrl(); 48 | 49 | String taskInstanceContext = getTaskInstanceContext(taskId, accessToken, workflowAPI); 50 | 51 | String taskInstanceForm = getTaskInstanceForm(taskId, accessToken, workflowAPI); 52 | 53 | ObjectMapper mapper = new ObjectMapper(); 54 | try { 55 | return new Task(taskNode, 56 | (ObjectNode) mapper.readTree(taskInstanceContext), 57 | (ObjectNode) mapper.readTree(taskInstanceForm)); 58 | } catch (IOException e) { 59 | throw new RemoteAccessException("Error while processing task " + taskId, e); 60 | } 61 | } 62 | 63 | private String getTaskInstanceContext(String taskId, String accessToken, String workflowAPI) throws RemoteAccessException { 64 | String taskInstanceContext = "{}"; 65 | String taskInstanceContextUrl = workflowAPI + "/v1/task-instances/" + taskId + "/context"; 66 | LOG.info("Task instance context endpoint: {}", taskInstanceContextUrl); 67 | HttpGet httpGet = new HttpGet(taskInstanceContextUrl); 68 | httpGet.setHeader("Authorization", "Bearer " + accessToken); 69 | 70 | try (CloseableHttpClient httpclient = HttpClients.createDefault(); 71 | CloseableHttpResponse response = httpclient.execute(httpGet); 72 | InputStream content = HttpUtils.getContent(response, "{}"); 73 | Scanner scanner = new Scanner(content, "utf-8")) { 74 | taskInstanceContext = scanner.useDelimiter("\\A").next(); 75 | } catch (IOException e) { 76 | throw new RemoteAccessException("Error while retrieving context for task " + taskId, e); 77 | } 78 | return taskInstanceContext; 79 | } 80 | 81 | private String getTaskInstanceForm(String taskId, String accessToken, String workflowAPI) throws RemoteAccessException { 82 | String taskInstanceForm = "{}"; 83 | String taskInstanceFormUrl = workflowAPI + "/internal/v1/task-instances/" + taskId + "/form/model"; 84 | LOG.info("Task instance form endpoint: {}", taskInstanceFormUrl); 85 | HttpGet httpGet = new HttpGet(taskInstanceFormUrl); 86 | httpGet.setHeader("Authorization", "Bearer " + accessToken); 87 | 88 | try (CloseableHttpClient httpclient = HttpClients.createDefault(); 89 | CloseableHttpResponse response = httpclient.execute(httpGet); 90 | InputStream content = HttpUtils.getContent(response, "{}"); 91 | Scanner scanner = new Scanner(content, "utf-8")) { 92 | taskInstanceForm = scanner.useDelimiter("\\A").next(); 93 | } catch (IOException e) { 94 | throw new RemoteAccessException("Error while retrieving form for task " + taskId, e); 95 | } 96 | return taskInstanceForm; 97 | } 98 | 99 | } --------------------------------------------------------------------------------