@@ -136,7 +136,7 @@ class ProcessRequestToken extends ProcessMakerModel implements TokenInterface
136136 */
137137 protected $ appends = [
138138 'advanceStatus ' ,
139- 'elementDestination '
139+ 'elementDestination ' ,
140140 ];
141141
142142 /**
@@ -1196,13 +1196,14 @@ public function reassign($toUserId, User $requestingUser)
11961196 * @param elementDestinationType Used to determine the type of destination for an element.
11971197 * @param elementDestinationProp Used to determine the properties of the destination for an element.
11981198 *
1199- * @return string |null Returns the destination URL.
1199+ * @return array |null Returns the destination URL.
12001200 */
1201- private function getElementDestination ($ elementDestinationType , $ elementDestinationProp ): ?string
1201+ private function getElementDestination ($ elementDestinationType , $ elementDestinationProp ): ?array
12021202 {
12031203 $ elementDestination = null ;
12041204
12051205 switch ($ elementDestinationType ) {
1206+ case 'anotherProcess ' :
12061207 case 'customDashboard ' :
12071208 case 'externalURL ' :
12081209 if (array_key_exists ('value ' , $ elementDestinationProp )) {
@@ -1227,7 +1228,7 @@ private function getElementDestination($elementDestinationType, $elementDestinat
12271228 case 'processLaunchpad ' :
12281229 $ elementDestination = route ('process.browser.index ' , [
12291230 'process ' => $ this ->process_id ,
1230- 'categorySelected ' => -1
1231+ 'categorySelected ' => -1 ,
12311232 ]);
12321233 break ;
12331234 case 'taskSource ' :
@@ -1236,18 +1237,20 @@ private function getElementDestination($elementDestinationType, $elementDestinat
12361237 default :
12371238 $ elementDestination = null ;
12381239 break ;
1239-
12401240 }
12411241
1242- return $ elementDestination ;
1242+ return [
1243+ 'type ' => $ elementDestinationType ,
1244+ 'value ' => $ elementDestination ,
1245+ ];
12431246 }
12441247
12451248 /**
12461249 * Determines the destination URL based on the element destination type specified in the definition.
12471250 *
1248- * @return string |null
1251+ * @return array |null
12491252 */
1250- public function getElementDestinationAttribute (): ?string
1253+ public function getElementDestinationAttribute (): ?array
12511254 {
12521255 $ definition = $ this ->getDefinition ();
12531256 $ elementDestinationProp = $ definition ['elementDestination ' ] ?? null ;
0 commit comments