Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Community examples, open to everyone. This is the section external contributions
| [`expense-policy-agent-skill`](examples/expense-policy-agent-skill) | A markdown skill that teaches an agent to answer expense policy questions and escalate anything it cannot verify. | Agent Skill |
| [`employee-data-orchestration`](examples/employee-data-orchestration) | An orchestration that reads worker data from one tenant and creates matching records through the Workday REST API. | Orchestration |
| [`peer-kudos-home-card`](examples/peer-kudos-home-card) | An Extend app with a Home page card, custom business object, and orchestration that lets employees celebrate peer contributions and notifies managers. | Extend App |
| [`promotion-nomination`](examples/promotion-nomination) | A manager nominates a direct report for promotion. Career data is prefilled from Workday, the nomination is saved to a business object, and a business process routes it for approval. | Extend App |
| [`pto-policy-agent-skill`](examples/pto-policy-agent-skill) | A markdown skill that teaches an agent to answer employee questions about PTO, leave accrual, rollover, and sick leave policy with clear escalation rules. | Agent Skill |
| [`stock-notifications`](examples/stock-notifications) | An Extend app that fetches Workday's current stock price from an external API and displays it on a home page card. | Extend App |
| [`wql-anniversary-celebrations`](examples/wql-anniversary-celebrations) | An orchestration that queries Workday via WQL for active workers celebrating milestone work anniversaries and formats an announcement digest payload for collaboration channels. | Orchestration |
Expand Down
34 changes: 34 additions & 0 deletions examples/promotion-nomination/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Promotion Nomination

## What it is

A Workday Extend app that lets a manager nominate one of their direct reports for promotion. The manager picks an employee, sees career details pulled from Workday, adds a justification, and submits. The nomination is saved to a custom business object and sent into a business process for approval. A second page shows a submitted nomination as read-only details when someone opens the business process event.

It is a good reference if you want to see WQL-driven form prefill, a two-step submit (save an object, then start a business process on it), and a VIEW page driven by a business process event ID.

## What's inside

- `presentation/managerNomination.pmd`: the landing page (route `/`). Employee picker, prefilled career fields, nomination form, and the submit logic.
- `presentation/eventDetails.pmd`: the read-only page (route `/eventDetails/{eventId}`). Loads the business process event, follows it to the saved nomination, and displays it.
- `presentation/promotionNomination_rvylxm.amd`: the app definition. Declares the two routes and the five data providers (`workday-staffing`, `workday-wql`, `workday-common`, `workday-bp`, `app`), all built on `apiGatewayEndpoint`.
- `presentation/promotionNomination_rvylxm.smd`: the site definition. Holds the app and site ids, the language, and the SSO authentication scheme.

Both pages use the `ManagerPromotionNomination` security domain.

## How to use it

1. **Pick an employee.** The list comes from a WQL query on `myDirectReports`.
2. **Review the prefilled data.** Once an employee is chosen, the page fills in current job profile, current job title, time in job profile, hire date and last promotion date. These fields are read-only.
3. **Complete the nomination.** Choose a reason (Merit/Performance, Increased Responsibilities, or Organizational Restructuring), a proposed effective date and a proposed job profile. The promotion cycle is set to the current year. Then answer three required questions: why the worker is being considered, what the business need is, and how the worker suits the role.
4. **Submit.** The page posts the nomination to the `promotionNominationBOS` business object, then posts to `promotionNominationBPEvents` with that object as the business process target. The new event ID is returned to the flow as `PromotionSubmissionResponseValue`.
5. **View the result.** Opening the business process event lands on `eventDetails`, which shows the nominee, nominator, reason, dates, job profiles and the three written answers.

To test, sign in as a manager with direct reports and run through the steps above. Also try an employee with no hire date, and a submission with no proposed job profile selected. Both should still submit.

## Before you deploy

- **App reference id.** If he site.applicationid throws an error on the app builder, please replace it with your application ID.
- **Worker type ID.** The `getEmployeeList` endpoint in `managerNomination.pmd` limits direct reports to one worker type, using the ID `d588c41a446c11de98360015c5e6daf6`. That ID is specific to the tenant this example came from. Replace it with the worker type you want, or remove the filter.
- **Security domain.** Map `ManagerPromotionNomination` to the security groups that should submit and view nominations, then activate pending security policy changes.
- **Business object and business process.** The app expects a `promotionNominationBOS` business object and a `promotionNominationBPEvents` business process. Approval steps, such as routing to a next-level manager or a People Business Partner, are set up in the business process definition, not in these page files. Configure them for your own approval chain.
- **Last promotion date fallback.** When a worker has no last promotion date, `managerNomination.pmd` uses `2020-01-01`. Change that default in the employee `onChange` if it does not suit your data.
5 changes: 5 additions & 0 deletions examples/promotion-nomination/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Promotion Nomination",
"description": "A manager nominates a direct report for promotion. Career data is prefilled from Workday, the nomination is saved to a business object, and a business process routes it for approval.",
"type": "Extend App"
}
13 changes: 13 additions & 0 deletions examples/promotion-nomination/model/DefaultPhoto.attachment
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"id": 1,
"name": "DefaultPhoto",
"label": "Default Photo",
"defaultSecurityDomains": [
"ManagerPromotionNomination"
],
"defaultCollection": {
"name": "defaultPhotos",
"label": "Default Photos"
},
"fields": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"id": 1,
"name": "ManagerPromotionNomination",
"enabledForPageSecurity": true,
"enabledForOrchestrationSecurity": false
}
10 changes: 10 additions & 0 deletions examples/promotion-nomination/model/NominateEmployee.task
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": 1,
"name": "NominateEmployee",
"label": "Nominate Employee",
"securityDomains": [
"ManagerPromotionNomination"
],
"businessObject": "PromotionNominationBO",
"routePath": "/"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"id": 1,
"name": "PromotionNominationBO",
"label": "Promotion Nomination B O",
"defaultSecurityDomains": [
"ManagerPromotionNomination"
],
"defaultCollection": {
"name": "promotionNominationBOS",
"label": "Promotion Nomination B O S"
},
"fields": [
{
"enableReportingFromTarget": false,
"secureByTarget": true,
"target": "WORKER",
"isPurgeable": false,
"useForDisplay": false,
"type": "SINGLE_INSTANCE",
"name": "nominee",
"id": 1
},
{
"enableReportingFromTarget": false,
"secureByTarget": true,
"target": "WORKER",
"isPurgeable": false,
"useForDisplay": false,
"type": "SINGLE_INSTANCE",
"name": "nominator",
"id": 2
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"label": "Nomination Reason",
"type": "TEXT",
"name": "nominationReason",
"id": 3
},
{
"precision": "DAY",
"enableIndex": false,
"isPurgeable": false,
"type": "DATE",
"name": "proposedDate",
"id": 4
},
{
"enableReportingFromTarget": false,
"secureByTarget": false,
"target": "JOB_PROFILE",
"isPurgeable": false,
"useForDisplay": false,
"type": "SINGLE_INSTANCE",
"name": "proposedJobProfile",
"id": 5
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "promotionCycle",
"id": 6
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "timeInJobProfile",
"id": 7
},
{
"precision": "DAY",
"enableIndex": false,
"isPurgeable": false,
"type": "DATE",
"name": "hireDate",
"id": 8
},
{
"enableReportingFromTarget": false,
"secureByTarget": false,
"target": "JOB_PROFILE",
"isPurgeable": false,
"useForDisplay": false,
"type": "SINGLE_INSTANCE",
"name": "currentJobProfile",
"id": 9
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "currentJobTitle",
"id": 10
},
{
"precision": "DAY",
"enableIndex": false,
"isPurgeable": false,
"type": "DATE",
"name": "lastPromotionDate",
"id": 11
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "workerConsideration",
"id": 12
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "businessNeed",
"id": 13
},
{
"enableSearch": false,
"enableIndex": false,
"isPurgeable": false,
"useForDisplay": false,
"isReferenceId": false,
"type": "TEXT",
"name": "workerSuitRole",
"id": 14
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": 1,
"name": "PromotionNominationBP",
"label": "Promotion Nomination BP",
"description": "Business Process Type for PromotionNominationBP",
"useForOrchestrate": false,
"allowsCancel": true,
"approvalStep": {
"pageRoute": "/eventDetails",
"actions": [
"APPROVE",
"DENY"
]
},
"actionSteps": [],
"targetBusinessObject": "PromotionNominationBO",
"securityDomains": [
"ManagerPromotionNomination"
],
"details": {
"pageRoute": "/eventDetails/{eventId}"
},
"allowsManualSendBack": false,
"allowsRescind": true
}
101 changes: 101 additions & 0 deletions examples/promotion-nomination/model/PromotionNominations.report
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"id": 1,
"name": "PromotionNominations",
"businessObject": "PromotionNominationBO",
"defaultSecurityDomains": [
"ManagerPromotionNomination"
],
"sortConfigs": [],
"columns": [
{
"id": 1,
"name": "PromotionNominationBO",
"order": "a",
"isSelfReferencing": true
},
{
"id": 2,
"name": "Nominee",
"order": "b",
"field": "nominee"
},
{
"id": 3,
"name": "Nominator",
"order": "c",
"field": "nominator"
},
{
"id": 4,
"name": "Nomination Reason",
"order": "d",
"field": "nominationReason"
},
{
"id": 5,
"name": "Proposed Date",
"order": "e",
"field": "proposedDate"
},
{
"id": 6,
"name": "Proposed Job Profile",
"order": "f",
"field": "proposedJobProfile"
},
{
"id": 7,
"name": "Promotion Cycle",
"order": "g",
"field": "promotionCycle"
},
{
"id": 8,
"name": "Time In Job Profile",
"order": "h",
"field": "timeInJobProfile"
},
{
"id": 9,
"name": "Hire Date",
"order": "i",
"field": "hireDate"
},
{
"id": 10,
"name": "Current Job Profile",
"order": "j",
"field": "currentJobProfile"
},
{
"id": 11,
"name": "Current Job Title",
"order": "k",
"field": "currentJobTitle"
},
{
"id": 12,
"name": "Last Promotion Date",
"order": "l",
"field": "lastPromotionDate"
},
{
"id": 13,
"name": "Worker Consideration",
"order": "m",
"field": "workerConsideration"
},
{
"id": 15,
"name": "Worker Suit Role",
"order": "o",
"field": "workerSuitRole"
},
{
"id": 16,
"name": "Business Need",
"order": "p",
"field": "businessNeed"
}
]
}
Loading