Skip to content

New Catalog App - Create Work Event With Agent - #23

Open
jaredjaffa wants to merge 1 commit into
mainfrom
Create-A-Work-Event-With-Agent-Catalog-App
Open

jaredjaffa wants to merge 1 commit into
mainfrom
Create-A-Work-Event-With-Agent-Catalog-App

Conversation

@jaredjaffa

Copy link
Copy Markdown
Collaborator

Added first version of Create work Event With Agent app

What this PR adds or changes

Adds an Agent on top of the Create a Work Event app catalog app.

Checklist for new or changed examples

  • [ x] The example lives entirely in its own folder under examples/
  • [ x] node scripts/validate-examples.mjs --check passes (valid example.json, README present, index table in sync)
  • [ x] The README says what the artifact is, how to use it, and what to change before deploying it (the "Before you deploy" section)
  • [x ] No credentials, tenant names, or real personal data anywhere in the folder
  • [x ] node scripts/audit-examples.mjs --changed passes, or the findings it reports are explained below (see docs/EXAMPLE_BEST_PRACTICES.md)

Anything reviewers should know?

Added first version of Create work Event With Agent

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example audit: 40 inline comment(s). The summary comment on this PR has the full list.

@@ -0,0 +1,122 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMDSecurityDomainRule (ACTION)

PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).

Why: Ensures PMD pages have at least one security domain defined (excludes microConclusion and error pages unless strict mode is enabled)

Read more

@@ -0,0 +1,122 @@
{
"id": "calendarWorkEvents",
"onLoad": "<%

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMDSectionOrderingRule (ACTION, was ADVICE)

PMD sections are not in the correct order.
Expected: [1. id, 2. endPoints, 3. onLoad, 4. presentation]
Actual: [1. id, 2. onLoad, 3. presentation, 4. endPoints]

Why: Ensures PMD file root-level sections follow consistent ordering for better readability

Read more

"onLoad": "<%
// The sample calendar is view-only for non-employees.
me.workerType.descriptor == 'Employee' ? pageVariables.viewOnly = false : pageVariables.viewOnly = true;
getWorkEvents.data.forEach(e => { e.status = getBPEvents.data.find(bpEvent => {bpEvent.businessProcessTarget.id == e.id}).status ?? 'Approved'});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptDescriptiveParameterRule (ACTION, was ADVICE)

Parameter 'e' in forEach() should be more descriptive. Consider using a more descriptive name, such as 'item' instead. Single-letter parameters make functions that take function parameters harder to read and debug.

Why: Ensures function parameters use descriptive names when functions take function parameters (except 'a', 'b' for sort)

Read more

// The sample calendar is view-only for non-employees.
me.workerType.descriptor == 'Employee' ? pageVariables.viewOnly = false : pageVariables.viewOnly = true;
getWorkEvents.data.forEach(e => { e.status = getBPEvents.data.find(bpEvent => {bpEvent.businessProcessTarget.id == e.id}).status ?? 'Approved'});
console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptConsoleLogRule (ACTION)

File section 'onLoad' contains console.info statement. Remove debug statements from production code.

Why: Ensures scripts don't contain console statements (production code)

Suggested change
console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data));
// console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data));

Read more

// The sample calendar is view-only for non-employees.
me.workerType.descriptor == 'Employee' ? pageVariables.viewOnly = false : pageVariables.viewOnly = true;
getWorkEvents.data.forEach(e => { e.status = getBPEvents.data.find(bpEvent => {bpEvent.businessProcessTarget.id == e.id}).status ?? 'Approved'});
console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptStringConcatRule (ACTION, was ADVICE)

File section 'onLoad' uses string concatenation with + operator: ''augmented work event data is ' + jsonasJSONgetWorkEvents.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!).

Why: Detects string concatenation with + operator - use PMD templates with backticks and {{ }} instead

Suggested change:

`augmented work event data is {{jsonasJSONgetWorkEvents.data}}`

Read more

"url": "<% //Grab the request ID using the BP Event ID. queryParams.eventId will automatically pull in the BP Event ID if it is in the page's scope
var query = 'SELECT businessProcessTarget, status FROM ' + site.applicationId + '_createWorkEventEvents';
//if you reuse this code be sure to replace _createWorkEventEvents above with the appropriate endpoint for your Model BP
console.info('getBPEvents query is ' + query);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptStringConcatRule (ACTION, was ADVICE)

Inbound endpoint 'getBPEvents' uses string concatenation with + operator: ''getBPEvents query is ' + query'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!).

Why: Detects string concatenation with + operator - use PMD templates with backticks and {{ }} instead

Suggested change
console.info('getBPEvents query is ' + query);
console.info(`getBPEvents query is {{query}}`);

Read more

var query = 'SELECT businessProcessTarget, status FROM ' + site.applicationId + '_createWorkEventEvents';
//if you reuse this code be sure to replace _createWorkEventEvents above with the appropriate endpoint for your Model BP
console.info('getBPEvents query is ' + query);
return 'data?query=' + query.pathEncode() %>",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptStringConcatRule (ACTION, was ADVICE)

Inbound endpoint 'getBPEvents' uses string concatenation with + operator: ''data?query=' + query.pathEncode'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!).

Why: Detects string concatenation with + operator - use PMD templates with backticks and {{ }} instead

Suggested change
return 'data?query=' + query.pathEncode() %>",
return `data?query={{query.pathEncode}}`() %>",

Read more

@@ -0,0 +1,235 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMDSecurityDomainRule (ACTION)

PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).

Why: Ensures PMD pages have at least one security domain defined (excludes microConclusion and error pages unless strict mode is enabled)

Read more

],
"endPoints": [
{
"name": "me",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EndpointFailOnStatusCodesRule (ACTION)

Inbound endpoint 'me' is missing required 'failOnStatusCodes' field.

Why: Ensures endpoints have failOnStatusCodes with minimum required codes 400 and 403

Suggested change:

"failOnStatusCodes": [{"code": 400}, {"code": 403}]

Read more

"outboundData": {
"outboundEndPoints": [
{
"name": "createEvent",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EndpointFailOnStatusCodesRule (ACTION)

Outbound endpoint 'createEvent' is missing required 'failOnStatusCodes' field.

Why: Ensures endpoints have failOnStatusCodes with minimum required codes 400 and 403

Suggested change:

"failOnStatusCodes": [{"code": 400}, {"code": 403}]

Read more

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example audit, continued (21 to 40 of 40).

//self.data is the payload as it exists coming into this onSend event
self.data.put('createdBy',{'id':me.id}); //add createdBy object
self.data.internalOnly = internalOnlyRadioGroup.value[0] == 'yes' ? true : false; //convert internalOnly radio group response from String to Boolean
console.info('new event payload is ' + json:asJSON(self.data)); return self.data; %>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptConsoleLogRule (ACTION)

File section 'outboundEndpoints[0]->name: createEvent->onSend' contains console.info statement. Remove debug statements from production code.

Why: Ensures scripts don't contain console statements (production code)

Suggested change
console.info('new event payload is ' + json:asJSON(self.data)); return self.data; %>"
// console.info('new event payload is ' + json:asJSON(self.data)); return self.data; %>"

Read more

//self.data is the payload as it exists coming into this onSend event
self.data.put('createdBy',{'id':me.id}); //add createdBy object
self.data.internalOnly = internalOnlyRadioGroup.value[0] == 'yes' ? true : false; //convert internalOnly radio group response from String to Boolean
console.info('new event payload is ' + json:asJSON(self.data)); return self.data; %>"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptStringConcatRule (ACTION, was ADVICE)

Outbound endpoint 'createEvent' uses string concatenation with + operator: ''new event payload is ' + jsonasJSONself.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!).

Why: Detects string concatenation with + operator - use PMD templates with backticks and {{ }} instead

Suggested change:

`new event payload is {{jsonasJSONself.data}}`

Read more

console.info('new event payload is ' + json:asJSON(self.data)); return self.data; %>"
},
{
"name": "createWorkEventEvents",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EndpointFailOnStatusCodesRule (ACTION)

Outbound endpoint 'createWorkEventEvents' is missing required 'failOnStatusCodes' field.

Why: Ensures endpoints have failOnStatusCodes with minimum required codes 400 and 403

Suggested change:

"failOnStatusCodes": [{"code": 400}, {"code": 403}]

Read more

"authType": "sso",
"onSend": "<%
//Kicks off BP. Pass in ID of the Work Event business object and when it is successfully created will trigger BP. Name element is the name of the BP in lower camel case + 'Events' from the .businessprocess file
console.info(json:asJSON(self.data));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptConsoleLogRule (ACTION)

File section 'outboundEndpoints[1]->name: createWorkEventEvents->onSend' contains console.info statement. Remove debug statements from production code.

Why: Ensures scripts don't contain console statements (production code)

Suggested change
console.info(json:asJSON(self.data));
// console.info(json:asJSON(self.data));

Read more

]
},
{
"name": "eventAttachments",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EndpointFailOnStatusCodesRule (ACTION)

Outbound endpoint 'eventAttachments' is missing required 'failOnStatusCodes' field.

Why: Ensures endpoints have failOnStatusCodes with minimum required codes 400 and 403

Suggested change:

"failOnStatusCodes": [{"code": 400}, {"code": 403}]

Read more

@@ -0,0 +1,32 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMDSecurityDomainRule (ACTION)

PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).

Why: Ensures PMD pages have at least one security domain defined (excludes microConclusion and error pages unless strict mode is enabled)

Read more

"id": "createEventWizard",
"endPoints": [ ],
"presentation": {
"body": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WidgetIdRequiredRule (ACTION)

Widget of type 'editWizard' at body is missing required 'id' field.

Why: Ensures all widgets have an 'id' field set (structure validation for PMD and POD files)

Read more

@@ -0,0 +1,119 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMDSecurityDomainRule (ACTION)

PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).

Why: Ensures PMD pages have at least one security domain defined (excludes microConclusion and error pages unless strict mode is enabled)

Read more

],
"endPoints": [
{
"name": "getAttachments",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EndpointFailOnStatusCodesRule (ACTION)

Inbound endpoint 'getAttachments' is missing required 'failOnStatusCodes' field.

Why: Ensures endpoints have failOnStatusCodes with minimum required codes 400 and 403

Suggested change:

"failOnStatusCodes": [{"code": 400}, {"code": 403}]

Read more

{
"name": "getAttachments",
"baseUrlType": "app",
"url": "<% 'attachedFiles?event=' + flowVariables.currentEvent //'instance filter' checks for files that match the given Model BO

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ScriptStringConcatRule (ACTION, was ADVICE)

Inbound endpoint 'getAttachments' uses string concatenation with + operator: ''attachedFiles?event=' + flowVariables.currentEvent'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!).

Why: Detects string concatenation with + operator - use PMD templates with backticks and {{ }} instead

Suggested change
"url": "<% 'attachedFiles?event=' + flowVariables.currentEvent //'instance filter' checks for files that match the given Model BO
"url": "<% `attachedFiles?event={{flowVariables.currentEvent}}` //'instance filter' checks for files that match the given Model BO

Read more

@github-actions

Copy link
Copy Markdown

The Audit examples check failed because of the items under Fix before merge. Push a fix and it re-runs automatically.

Example audit

Audited catalog/createAWorkEventWithAgent. Passed: no hardcoded Workday URLs or app ids.

344 to fix and 0 suggestion(s).

Fix before merge

Where Rule What to change
catalog/createAWorkEventWithAgent HubFolderKebabCaseRule Folder name "createAWorkEventWithAgent" is not kebab-case (lowercase letters, digits, and hyphens). Rename it to "create-awork-event-with-agent". Replace createAWorkEventWithAgent with create-awork-event-with-agent.
catalog/createAWorkEventWithAgent/README.md HubReadmeSectionsRule README.md has no "## Before you deploy" section. List everything a reader must change before this works in their tenant: app reference ids, base URLs, WIDs, security domains, dates or periods. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/README.md HubReadmeSectionsRule README.md is missing the sections "## What it is", "## What's inside". Readers need to know what the example is, what is in the folder, and how to use it.
catalog/createAWorkEventWithAgent/example.json HubExampleJsonRule example.json is missing. Copy examples/_template/example.json and fill in title, description, and type.
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 3 PMDSectionOrderingRule PMD sections are not in the correct order. Expected: [1. id, 2. endPoints, 3. onLoad, 4. presentation] Actual: [1. id, 2. onLoad, 3. presentation, 4. endPoints] (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 6 ScriptDescriptiveParameterRule Parameter 'e' in forEach() should be more descriptive. Consider using a more descriptive name, such as 'item' instead. Single-letter parameters make functions that take function parameters harder to read and debug. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 7 ScriptConsoleLogRule File section 'onLoad' contains console.info statement. Remove debug statements from production code. Replace console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data)); with // console.info('augmented work event data is ' + json:asJSON(getWorkEvents.data));.
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 7 ScriptStringConcatRule File section 'onLoad' uses string concatenation with + operator: ''augmented work event data is ' + jsonasJSONgetWorkEvents.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'augmented work event data is ' + jsonasJSONgetWorkEvents.data with augmented work event data is {{jsonasJSONgetWorkEvents.data}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 15 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 81 WidgetIdRequiredRule Widget of type 'richText' at footer->children[0]->type: richText is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 83 StringBooleanRule Field 'enabled' has string value 'false' instead of boolean false. Use boolean false instead of string 'false'. Replace "enabled": "false" with "enabled": false. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 92 EndpointFailOnStatusCodesRule Inbound endpoint 'me' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 97 EndpointFailOnStatusCodesRule Inbound endpoint 'getWorkEvents' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 99 MultipleStringInterpolatorsRule String has 2 interpolators. Use a SINGLE interpolator with template literals inside: <% Use template literal with {{variable}} %> Replace workEvents?limit=<% pagingVariables.limit ?: 50 %>&offset=<% pagingVariables.offset ?: 0 %> with <% workEvents?limit={{pagingVariables.limit ?: 50}}&offset={{pagingVariables.offset ?: 0}} %>. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 99 ScriptMagicNumberRule File section 'inboundEndpoints[1]->name: getWorkEvents->url' contains magic number '50': 'workEvents?limit=<% pagingVariables.limit ?: 50 %>&offset=<% pagingVariables.offset ?: 0 %>'. Consider using a named constant instead. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 108 ScriptStringConcatRule Inbound endpoint 'getBPEvents' uses string concatenation with + operator: ''SELECT businessProcessTarget, status FROM ' + site.applicationId + '_createWorkEventEvents''. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'SELECT businessProcessTarget, status FROM ' + site.applicationId + '_createWorkEventEvents' with SELECT businessProcessTarget, status FROM {{site.applicationId}}_createWorkEventEvents. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 108 ScriptVarUsageRule File section 'inboundEndpoints[2]->name: getBPEvents->url' uses 'var' declaration for variable 'query'. Consider using 'let' or 'const' instead. Replace var query with let query. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 110 ScriptConsoleLogRule File section 'inboundEndpoints[2]->name: getBPEvents->url' contains console.info statement. Remove debug statements from production code. Replace console.info('getBPEvents query is ' + query); with // console.info('getBPEvents query is ' + query);.
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 110 ScriptStringConcatRule Inbound endpoint 'getBPEvents' uses string concatenation with + operator: ''getBPEvents query is ' + query'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'getBPEvents query is ' + query with getBPEvents query is {{query}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/calendarWorkEvents.pmd line 111 ScriptStringConcatRule Inbound endpoint 'getBPEvents' uses string concatenation with + operator: ''data?query=' + query.pathEncode'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'data?query=' + query.pathEncode with data?query={{query.pathEncode}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 8 EndpointFailOnStatusCodesRule Inbound endpoint 'me' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 17 EndpointFailOnStatusCodesRule Outbound endpoint 'createEvent' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 26 ScriptConsoleLogRule File section 'outboundEndpoints[0]->name: createEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('new event payload is ' + json:asJSON(self.data)); with // console.info('new event payload is ' + json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 26 ScriptStringConcatRule Outbound endpoint 'createEvent' uses string concatenation with + operator: ''new event payload is ' + jsonasJSONself.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'new event payload is ' + jsonasJSONself.data with new event payload is {{jsonasJSONself.data}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 29 EndpointFailOnStatusCodesRule Outbound endpoint 'createWorkEventEvents' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 36 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: createWorkEventEvents->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info(json:asJSON(self.data)); with // console.info(json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 48 EndpointFailOnStatusCodesRule Outbound endpoint 'eventAttachments' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 56 ScriptVarUsageRule File section 'outboundEndpoints[2]->name: eventAttachments->onMultiPartSend' uses 'var' declaration for variable 'var' in for-in loop. Consider using 'let' or 'const' instead. Suggested: let. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 62 ScriptConsoleLogRule File section 'outboundEndpoints[2]->name: eventAttachments->onMultiPartSend' contains console.info statement. Remove debug statements from production code. Replace console.info('metadata is ' + json:asJSON(self.data)); with // console.info('metadata is ' + json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 62 ScriptStringConcatRule Outbound endpoint 'eventAttachments' uses string concatenation with + operator: ''metadata is ' + json:asJSONself.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'metadata is ' + json:asJSONself.data with metadata is {{json:asJSONself.data}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 77 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 80 WidgetIdRequiredRule Widget of type 'section' at body->children[1]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 81 WidgetIdRequiredRule Widget of type 'section' at body->children[0]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 115 ScriptStringConcatRule File section 'presentation->body->children[0]->type: section->children[2]->id: description->aiPrompt->buttons[0]->label: Generate Work Event Description->prompt' uses string concatenation with + operator: ''Create a description around 150 characters for' + name.value + ' and include event location ' + location.value'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'Create a description around 150 characters for' + name.value + ' and include event location ' + location.value with Create a description around 150 characters for{{name.value}} and include event location {{location.value}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 123 ScriptStringConcatRule File section 'presentation->body->children[0]->type: section->children[2]->id: description->aiPrompt->buttons[1]->label: Refine My Event Description->prompt' uses string concatenation with + operator: ''Summarize or expand following text to 100 words: ' + description.value'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'Summarize or expand following text to 100 words: ' + description.value with Summarize or expand following text to 100 words: {{description.value}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 184 StringBooleanRule Field 'hideDisplayOption' has string value 'true' instead of boolean true. Use boolean true instead of string 'true'. Replace "hideDisplayOption": "true" with "hideDisplayOption": true. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEvent.pmd line 185 StringBooleanRule Field 'required' has string value 'true' instead of boolean true. Use boolean true instead of string 'true'. Replace "required": "true" with "required": true. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/createEventWizard.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/createEventWizard.pmd line 5 WidgetIdRequiredRule Widget of type 'editWizard' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 8 EndpointFailOnStatusCodesRule Inbound endpoint 'getAttachments' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 10 ScriptStringConcatRule Inbound endpoint 'getAttachments' uses string concatenation with + operator: ''attachedFiles?event=' + flowVariables.currentEvent'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'attachedFiles?event=' + flowVariables.currentEvent with attachedFiles?event={{flowVariables.currentEvent}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 23 EndpointFailOnStatusCodesRule Outbound endpoint 'deleteAttachment' is missing required status codes: 400, 403. Suggested: {"code": 400}, {"code": 403}.
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 41 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 45 WidgetIdRequiredRule Widget of type 'readOnlyText' at body->children[0]->label: Information is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 73 WidgetIdRequiredRule Widget of type 'section' at body->children[1]->id: gridAttachments->columns[1]->id: col1->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 79 StringBooleanRule Field 'enabled' has string value 'false' instead of boolean false. Use boolean false instead of string 'false'. Replace "enabled": "false" with "enabled": false. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/deleteAttachments.pmd line 87 MultipleStringInterpolatorsRule String has 2 interpolators. Use a SINGLE interpolator with template literals inside: <% Use template literal with {{variable}} %> Replace https://api.workday.com/apps/<% site.applicationId %>/v1/attachedFiles/<% file.id %> with <% https://api.workday.com/apps/{{site.applicationId}}/v1/attachedFiles/{{file.id}}` %>`. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 5 EndpointFailOnStatusCodesRule Inbound endpoint 'events' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 7 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''SELECT name, cost, workdayID AS id, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy, registrants FROM ' + site.applicationId + '_workEvents''. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'SELECT name, cost, workdayID AS id, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy, registrants FROM ' + site.applicationId + '_workEvents' with SELECT name, cost, workdayID AS id, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy, registrants FROM {{site.applicationId}}_workEvents. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 8 ScriptConsoleLogRule File section 'inboundEndpoints[0]->name: events->url' contains console.info statement. Remove debug statements from production code. Replace console.info('events query is ' + query); with // console.info('events query is ' + query);.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 8 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''events query is ' + query'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'events query is ' + query with events query is {{query}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 9 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''data?query=' + query.urlEncode'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'data?query=' + query.urlEncode with data?query={{query.urlEncode}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate->children[0]->label: Update is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'date' at body->children[1]->id: eventsGrid->columns[5]->columnId: StartDateOfEvent->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'date' at body->children[1]->id: eventsGrid->columns[6]->columnId: EndDateOfEvent->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'instanceList' at body->children[1]->id: eventsGrid->columns[10]->columnId: CreatedBy->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'instanceList' at body->children[1]->id: eventsGrid->columns[8]->columnId: BookedVenue->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'readOnlyText' at body->children[1]->id: eventsGrid->columns[9]->columnId: InternalOnly->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'richText' at body->children[1]->id: eventsGrid->columns[2]->columnId: Description->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'section' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[3]->columnId: Sponsor->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[4]->columnId: Proposed Location->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 20 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[7]->columnId: ContactInfo->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 23 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate->children[1]->label: Update Image is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 25 WidgetIdRequiredRule Widget of type 'section' at body->children[0]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageEvents.pmd line 49 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[0]->columnId: name->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 8 EndpointFailOnStatusCodesRule Inbound endpoint 'me' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 14 EndpointFailOnStatusCodesRule Inbound endpoint 'events' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 16 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''SELECT worker, event{workdayID as id, name, cost, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy} as event FROM ' + site.applicationId + '_registrants WHERE worker in (' + me.id + ')''. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'SELECT worker, event{workdayID as id, name, cost, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy} as event FROM ' + site.applicationId + '_registrants WHERE worker in (' + me.id + ')' with SELECT worker, event{workdayID as id, name, cost, description, sponsor, location, startDate, endDate, contactInfo, venue, createdBy} as event FROM {{site.applicationId}}_registrants WHERE worker in ({{me.id}}). (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 17 ScriptConsoleLogRule File section 'inboundEndpoints[1]->name: events->url' contains console.info statement. Remove debug statements from production code. Replace console.info('events query is ' + query); with // console.info('events query is ' + query);.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 17 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''events query is ' + query'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'events query is ' + query with events query is {{query}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 18 ScriptStringConcatRule Inbound endpoint 'events' uses string concatenation with + operator: ''data?query=' + query.urlEncode'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'data?query=' + query.urlEncode with data?query={{query.urlEncode}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate->children[0]->label: Update is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'date' at body->children[1]->id: eventsGrid->columns[5]->columnId: StartDateOfEvent->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'date' at body->children[1]->id: eventsGrid->columns[6]->columnId: EndDateOfEvent->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'instanceList' at body->children[1]->id: eventsGrid->columns[10]->columnId: CreatedBy->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'instanceList' at body->children[1]->id: eventsGrid->columns[8]->columnId: BookedVenue->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'readOnlyText' at body->children[1]->id: eventsGrid->columns[9]->columnId: InternalOnly->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'richText' at body->children[1]->id: eventsGrid->columns[2]->columnId: Description->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'section' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[3]->columnId: Sponsor->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[4]->columnId: Proposed Location->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 29 WidgetIdRequiredRule Widget of type 'text' at body->children[1]->id: eventsGrid->columns[7]->columnId: ContactInfo->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 32 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[11]->columnId: actions->cellTemplate->children[1]->label: Update Image is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 34 WidgetIdRequiredRule Widget of type 'section' at body->children[0]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/manageMyEvents.pmd line 58 WidgetIdRequiredRule Widget of type 'button' at body->children[1]->id: eventsGrid->columns[0]->columnId: name->cellTemplate is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/microConfirm.pmd line 11 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/microConfirm.pmd line 26 WidgetIdRequiredRule Widget of type 'richText' at footer->children[0]->type: richText is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/microConfirm.pmd line 28 StringBooleanRule Field 'enabled' has string value 'false' instead of boolean false. Use boolean false instead of string 'false'. Replace "enabled": "false" with "enabled": false. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 1 PMDSecurityDomainRule PMD page is missing required securityDomains list. All PMD pages must define at least one security domain (excludes microConclusion and error pages).
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 5 EndpointFailOnStatusCodesRule Inbound endpoint 'me' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 11 PMDSectionOrderingRule PMD sections are not in the correct order. Expected: [1. id, 2. endPoints, 3. outboundData, 4. onLoad, 5. presentation] Actual: [1. id, 2. endPoints, 3. onLoad, 4. presentation, 5. outboundData] (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 12 ScriptVarUsageRule File section 'onLoad' uses 'var' declaration for variable 'eventSelectedDates'. Consider using 'let' or 'const' instead. Replace var eventSelectedDates with let eventSelectedDates. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 22 ScriptStringConcatRule File section 'presentation->title->label' uses string concatenation with + operator: ''Quick Add Work Event: ' + queryParams.createdByName'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'Quick Add Work Event: ' + queryParams.createdByName with Quick Add Work Event: {{queryParams.createdByName}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 27 WidgetIdRequiredRule Widget of type 'section' at body->children[1]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 28 WidgetIdRequiredRule Widget of type 'section' at body->children[0]->type: section is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 62 ScriptStringConcatRule File section 'presentation->body->children[0]->type: section->children[2]->id: description->aiPrompt->buttons[0]->label: Generate Work Event Description->prompt' uses string concatenation with + operator: ''Create a description around 150 characters for' + name.value + ' and include event location ' + location.value'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'Create a description around 150 characters for' + name.value + ' and include event location ' + location.value with Create a description around 150 characters for{{name.value}} and include event location {{location.value}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 70 ScriptStringConcatRule File section 'presentation->body->children[0]->type: section->children[2]->id: description->aiPrompt->buttons[1]->label: Refine My Event Description->prompt' uses string concatenation with + operator: ''Summarize or expand following text to 100 words: ' + description.value'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'Summarize or expand following text to 100 words: ' + description.value with Summarize or expand following text to 100 words: {{description.value}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 134 StringBooleanRule Field 'hideDisplayOption' has string value 'true' instead of boolean true. Use boolean true instead of string 'true'. Replace "hideDisplayOption": "true" with "hideDisplayOption": true. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 135 StringBooleanRule Field 'required' has string value 'true' instead of boolean true. Use boolean true instead of string 'true'. Replace "required": "true" with "required": true. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 178 EndpointFailOnStatusCodesRule Outbound endpoint 'createEvent' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 188 ScriptConsoleLogRule File section 'outboundEndpoints[0]->name: createEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('new event payload is ' + json:asJSON(self.data)); with // console.info('new event payload is ' + json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 188 ScriptStringConcatRule Outbound endpoint 'createEvent' uses string concatenation with + operator: ''new event payload is ' + jsonasJSONself.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'new event payload is ' + jsonasJSONself.data with new event payload is {{jsonasJSONself.data}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 191 EndpointFailOnStatusCodesRule Outbound endpoint 'createWorkEventEvents' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 198 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: createWorkEventEvents->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info(json:asJSON(self.data)); with // console.info(json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 210 EndpointFailOnStatusCodesRule Outbound endpoint 'eventAttachments' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 218 ScriptVarUsageRule File section 'outboundEndpoints[2]->name: eventAttachments->onMultiPartSend' uses 'var' declaration for variable 'var' in for-in loop. Consider using 'let' or 'const' instead. Suggested: let. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 224 ScriptConsoleLogRule File section 'outboundEndpoints[2]->name: eventAttachments->onMultiPartSend' contains console.info statement. Remove debug statements from production code. Replace console.info('metadata is ' + json:asJSON(self.data)); with // console.info('metadata is ' + json:asJSON(self.data));.
catalog/createAWorkEventWithAgent/presentation/quickAddWorkEvent.pmd line 224 ScriptStringConcatRule Outbound endpoint 'eventAttachments' uses string concatenation with + operator: ''metadata is ' + json:asJSONself.data'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'metadata is ' + json:asJSONself.data with metadata is {{json:asJSONself.data}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerConfirmation.pmd line 8 StringBooleanRule Field 'micro' has string value 'true' instead of boolean true. Use boolean true instead of string 'true'. Replace "micro": "true" with "micro": true. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerConfirmation.pmd line 10 WidgetIdRequiredRule Widget of type 'section' at body is missing required 'id' field.
catalog/createAWorkEventWithAgent/presentation/registerConfirmation.pmd line 18 StringBooleanRule Field 'enabled' has string value 'false' instead of boolean false. Use boolean false instead of string 'false'. Replace "enabled": "false" with "enabled": false. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 7 ScriptUnusedIncludesRule Script file 'fileTypes' is included but never used. Consider removing from include array or add calls like 'fileTypes.functionName()'. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 11 EndpointFailOnStatusCodesRule Inbound endpoint 'me' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 17 EndpointFailOnStatusCodesRule Inbound endpoint 'event' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 21 ScriptStringConcatRule Inbound endpoint 'event' uses string concatenation with + operator: ''workEvents/' + queryParams.workEventId'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'workEvents/' + queryParams.workEventId with workEvents/{{queryParams.workEventId}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 25 EndpointFailOnStatusCodesRule Inbound endpoint 'eventImage' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 30 ScriptStringConcatRule Inbound endpoint 'eventImage' uses string concatenation with + operator: ''eventImages/' + event.image.id'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'eventImages/' + event.image.id with eventImages/{{event.image.id}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 38 ScriptStringConcatRule Inbound endpoint 'alreadyRegistered' uses string concatenation with + operator: ''SELECT worker FROM ' + site.applicationId + '_registrants where event = ' + queryParams.workEventId + ' AND worker = ' + me.id'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'SELECT worker FROM ' + site.applicationId + '_registrants where event = ' + queryParams.workEventId + ' AND worker = ' + me.id with SELECT worker FROM {{site.applicationId}}_registrants where event = {{queryParams.workEventId}} AND worker = {{me.id}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 38 ScriptVarUsageRule File section 'inboundEndpoints[3]->name: alreadyRegistered->url' uses 'var' declaration for variable 'query'. Consider using 'let' or 'const' instead. Replace var query with let query. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 39 ScriptConsoleLogRule File section 'inboundEndpoints[3]->name: alreadyRegistered->url' contains console.info statement. Remove debug statements from production code. Replace console.info('alreadyRegistered query is ' + json:asJSON(query)); with // console.info('alreadyRegistered query is ' + json:asJSON(query));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 39 ScriptStringConcatRule Inbound endpoint 'alreadyRegistered' uses string concatenation with + operator: ''alreadyRegistered query is ' + json:asJSONquery'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'alreadyRegistered query is ' + json:asJSONquery with alreadyRegistered query is {{json:asJSONquery}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 40 ScriptStringConcatRule Inbound endpoint 'alreadyRegistered' uses string concatenation with + operator: ''data?query=' + query.pathEncode'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'data?query=' + query.pathEncode with data?query={{query.pathEncode}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 52 EndpointFailOnStatusCodesRule Inbound endpoint 'getAttachments' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 54 ScriptStringConcatRule Inbound endpoint 'getAttachments' uses string concatenation with + operator: ''attachedFiles?event=' + queryParams.workEventId'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'attachedFiles?event=' + queryParams.workEventId with attachedFiles?event={{queryParams.workEventId}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 58 PMDSectionOrderingRule PMD sections are not in the correct order. Expected: [1. id, 2. securityDomains, 3. include, 4. endPoints, 5. onSubmit, 6. outboundData, 7. onLoad, 8. presentation] Actual: [1. id, 2. securityDomains, 3. include, 4. endPoints, 5. outboundData, 6. onLoad, 7. onSubmit, 8. presentation] (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 61 EndpointFailOnStatusCodesRule Outbound endpoint 'createRegistrant' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 71 ScriptConsoleLogRule File section 'outboundEndpoints[0]->name: createRegistrant->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('createRegistrant payload is ' + json:asJSON(payload)); with // console.info('createRegistrant payload is ' + json:asJSON(payload));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 71 ScriptStringConcatRule Outbound endpoint 'createRegistrant' uses string concatenation with + operator: ''createRegistrant payload is ' + json:asJSONpayload'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'createRegistrant payload is ' + json:asJSONpayload with createRegistrant payload is {{json:asJSONpayload}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 74 EndpointFailOnStatusCodesRule Outbound endpoint 'updateEvent' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 76 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''workEvents/' + event.id'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'workEvents/' + event.id with workEvents/{{event.id}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 79 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: updateEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('updateEvent has been invoked for event ' + event.id); with // console.info('updateEvent has been invoked for event ' + event.id);.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 79 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''updateEvent has been invoked for event ' + event.id'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'updateEvent has been invoked for event ' + event.id with updateEvent has been invoked for event {{event.id}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 80 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: updateEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('createRegistrant response is ' + json:asJSON(createRegistrant)); with // console.info('createRegistrant response is ' + json:asJSON(createRegistrant));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 80 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''createRegistrant response is ' + json:asJSONcreateRegistrant'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'createRegistrant response is ' + json:asJSONcreateRegistrant with createRegistrant response is {{json:asJSONcreateRegistrant}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 84 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: updateEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('new list is ' + json:asJSON(allRegistrants)); with // console.info('new list is ' + json:asJSON(allRegistrants));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 84 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''new list is ' + json:asJSONallRegistrants'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'new list is ' + json:asJSONallRegistrants with new list is {{json:asJSONallRegistrants}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 85 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: updateEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('allRegistrants is ' + json:asJSON(allRegistrants)); with // console.info('allRegistrants is ' + json:asJSON(allRegistrants));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 85 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''allRegistrants is ' + json:asJSONallRegistrants'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'allRegistrants is ' + json:asJSONallRegistrants with allRegistrants is {{json:asJSONallRegistrants}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 87 ScriptConsoleLogRule File section 'outboundEndpoints[1]->name: updateEvent->onSend' contains console.info statement. Remove debug statements from production code. Replace console.info('this updateEvent payload is ' + json:asJSON(payload)); with // console.info('this updateEvent payload is ' + json:asJSON(payload));.
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 87 ScriptStringConcatRule Outbound endpoint 'updateEvent' uses string concatenation with + operator: ''this updateEvent payload is ' + json:asJSONpayload'. Consider using PMD template strings with backticks and {{ }} syntax instead (e.g., Hello {{name}}!). Replace 'this updateEvent payload is ' + json:asJSONpayload with this updateEvent payload is {{json:asJSONpayload}}. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 92 EndpointFailOnStatusCodesRule Outbound endpoint 'createEventAttachment' is missing required 'failOnStatusCodes' field. Suggested: "failOnStatusCodes": [{"code": 400}, {"code": 403}].
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 99 ScriptVarUsageRule File section 'outboundEndpoints[2]->name: createEventAttachment->onMultiPartSend' uses 'var' declaration for variable 'var' in for-in loop. Consider using 'let' or 'const' instead. Suggested: let. (catalog apps are held to the stricter bar)
catalog/createAWorkEventWithAgent/presentation/registerForEvent.pmd line 105 ScriptConsoleLogRule File section 'outboundEndpoints[2]->name: createEventAttachment->onMultiPartSend' contains console.info statement. Remove debug statements from production code. Replace console.info('metadata is ' + json:asJSON(self.data)); with // console.info('metadata is ' + json:asJSON(self.data));.
... and 194 more

Run it yourself: ./scripts/install-arcane.sh once, then node scripts/audit-examples.mjs --changed. Rule explanations and fixes: docs/EXAMPLE_BEST_PRACTICES.md.

ACTION items fail the Audit examples check. ADVICE never blocks. Maintainers can add the audit-override label to merge with open ACTION items.

4 finding(s) are file-level and appear only in this summary.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant