Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
c92e64b5
Unverified
Commit
c92e64b5
authored
5 years ago
by
Roeland Jago Douma
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #17545 from nextcloud/bugfix/noid/workflow-catch
Ignore unavailable entity/operation classes
parents
83674f1b
99c30453
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/workflowengine/lib/AppInfo/Application.php
+11
-6
11 additions, 6 deletions
apps/workflowengine/lib/AppInfo/Application.php
with
11 additions
and
6 deletions
apps/workflowengine/lib/AppInfo/Application.php
+
11
−
6
View file @
c92e64b5
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
namespace
OCA\WorkflowEngine\AppInfo
;
namespace
OCA\WorkflowEngine\AppInfo
;
use
OCA\WorkflowEngine\Manager
;
use
OCA\WorkflowEngine\Manager
;
use
OCP\AppFramework\QueryException
;
use
OCP\Template
;
use
OCP\Template
;
use
OCA\WorkflowEngine\Controller\RequestTime
;
use
OCA\WorkflowEngine\Controller\RequestTime
;
use
OCP\WorkflowEngine\IEntity
;
use
OCP\WorkflowEngine\IEntity
;
...
@@ -89,12 +90,16 @@ class Application extends \OCP\AppFramework\App {
...
@@ -89,12 +90,16 @@ class Application extends \OCP\AppFramework\App {
$eventName
,
$eventName
,
function
(
GenericEvent
$event
)
use
(
$eventName
,
$operationClass
,
$entityClass
)
{
function
(
GenericEvent
$event
)
use
(
$eventName
,
$operationClass
,
$entityClass
)
{
$ruleMatcher
=
$this
->
manager
->
getRuleMatcher
();
$ruleMatcher
=
$this
->
manager
->
getRuleMatcher
();
/** @var IEntity $entity */
try
{
$entity
=
$this
->
getContainer
()
->
query
(
$entityClass
);
/** @var IEntity $entity */
$entity
->
prepareRuleMatcher
(
$ruleMatcher
,
$eventName
,
$event
);
$entity
=
$this
->
getContainer
()
->
query
(
$entityClass
);
/** @var IOperation $operation */
$entity
->
prepareRuleMatcher
(
$ruleMatcher
,
$eventName
,
$event
);
$operation
=
$this
->
getContainer
()
->
query
(
$operationClass
);
/** @var IOperation $operation */
$operation
->
onEvent
(
$eventName
,
$event
,
$ruleMatcher
);
$operation
=
$this
->
getContainer
()
->
query
(
$operationClass
);
$operation
->
onEvent
(
$eventName
,
$event
,
$ruleMatcher
);
}
catch
(
QueryException
$e
)
{
// Ignore query exceptions since they might occur when an entity/operation were setup before by an app that is disabled now
}
}
}
);
);
},
$eventNames
);
},
$eventNames
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment