diff --git a/apps/workflowengine/composer/composer/autoload_classmap.php b/apps/workflowengine/composer/composer/autoload_classmap.php
index 4dab03642ddd23334c209c7f1927e59ac3f7d7b1..6264358788c5d4678164fe093e95a4c2035dad23 100644
--- a/apps/workflowengine/composer/composer/autoload_classmap.php
+++ b/apps/workflowengine/composer/composer/autoload_classmap.php
@@ -16,6 +16,7 @@ return array(
     'OCA\\WorkflowEngine\\Check\\RequestTime' => $baseDir . '/../lib/Check/RequestTime.php',
     'OCA\\WorkflowEngine\\Check\\RequestURL' => $baseDir . '/../lib/Check/RequestURL.php',
     'OCA\\WorkflowEngine\\Check\\RequestUserAgent' => $baseDir . '/../lib/Check/RequestUserAgent.php',
+    'OCA\\WorkflowEngine\\Check\\TFileCheck' => $baseDir . '/../lib/Check/AFileCheck.php',
     'OCA\\WorkflowEngine\\Check\\UserGroupMembership' => $baseDir . '/../lib/Check/UserGroupMembership.php',
     'OCA\\WorkflowEngine\\Command\\Index' => $baseDir . '/../lib/Command/Index.php',
     'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => $baseDir . '/../lib/Controller/AWorkflowController.php',
diff --git a/apps/workflowengine/composer/composer/autoload_static.php b/apps/workflowengine/composer/composer/autoload_static.php
index 38b1a5b0e766e50934f173a6c2984ff5ede00404..cd370986f150c4671f71f4a0c77885910ab75dd6 100644
--- a/apps/workflowengine/composer/composer/autoload_static.php
+++ b/apps/workflowengine/composer/composer/autoload_static.php
@@ -31,6 +31,7 @@ class ComposerStaticInitWorkflowEngine
         'OCA\\WorkflowEngine\\Check\\RequestTime' => __DIR__ . '/..' . '/../lib/Check/RequestTime.php',
         'OCA\\WorkflowEngine\\Check\\RequestURL' => __DIR__ . '/..' . '/../lib/Check/RequestURL.php',
         'OCA\\WorkflowEngine\\Check\\RequestUserAgent' => __DIR__ . '/..' . '/../lib/Check/RequestUserAgent.php',
+        'OCA\\WorkflowEngine\\Check\\TFileCheck' => __DIR__ . '/..' . '/../lib/Check/AFileCheck.php',
         'OCA\\WorkflowEngine\\Check\\UserGroupMembership' => __DIR__ . '/..' . '/../lib/Check/UserGroupMembership.php',
         'OCA\\WorkflowEngine\\Command\\Index' => __DIR__ . '/..' . '/../lib/Command/Index.php',
         'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => __DIR__ . '/..' . '/../lib/Controller/AWorkflowController.php',
diff --git a/apps/workflowengine/lib/Check/AFileCheck.php b/apps/workflowengine/lib/Check/AFileCheck.php
new file mode 100644
index 0000000000000000000000000000000000000000..45d251b165948ad5526d32f8d49dcdf23c117987
--- /dev/null
+++ b/apps/workflowengine/lib/Check/AFileCheck.php
@@ -0,0 +1,67 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\WorkflowEngine\Check;
+
+use OCA\WorkflowEngine\AppInfo\Application;
+use OCA\WorkflowEngine\Entity\File;
+use OCP\Files\Node;
+use OCP\Files\Storage\IStorage;
+use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
+use OCP\WorkflowEngine\IFileCheck;
+
+trait TFileCheck {
+	/** @var IStorage */
+	protected $storage;
+
+	/** @var string */
+	protected $path;
+
+	/**
+	 * @param IStorage $storage
+	 * @param string $path
+	 * @since 18.0.0
+	 */
+	public function setFileInfo(IStorage $storage, $path) {
+		$this->storage = $storage;
+		$this->path = $path;
+	}
+
+	/**
+	 * @throws \OCP\Files\NotFoundException
+	 */
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		if ($entity instanceof File) {
+			if (!$subject instanceof Node) {
+				throw new \UnexpectedValueException(
+					'Expected Node subject for File entity, got {class}',
+					['app' => Application::APP_ID, 'class' => get_class($subject)]
+				);
+			}
+			$this->storage = $subject->getStorage();
+			$this->path = $subject->getPath();
+		}
+	}
+}
diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php
index edd983ba699270b4d4362d11ad2930b51cc13724..ec9a1945d9c3196047a09962bec1c98ead9de621 100644
--- a/apps/workflowengine/lib/Check/AbstractStringCheck.php
+++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php
@@ -22,9 +22,9 @@
 namespace OCA\WorkflowEngine\Check;
 
 
-use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
 use OCP\WorkflowEngine\IManager;
 
 abstract class AbstractStringCheck implements ICheck {
@@ -121,4 +121,8 @@ abstract class AbstractStringCheck implements ICheck {
 		$this->matches[$patternHash][$subjectHash] = preg_match($pattern, $subject);
 		return $this->matches[$patternHash][$subjectHash];
 	}
+
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		// Noop
+	}
 }
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php
index 52fc54fc8595cdf4dce471ea0da1473d1edf3433..92375d4d3cdf38276cf796f697ed5e746c7130a6 100644
--- a/apps/workflowengine/lib/Check/FileMimeType.php
+++ b/apps/workflowengine/lib/Check/FileMimeType.php
@@ -30,6 +30,9 @@ use OCP\IRequest;
 use OCP\WorkflowEngine\IFileCheck;
 
 class FileMimeType extends AbstractStringCheck implements IFileCheck {
+	use TFileCheck {
+		setFileInfo as _setFileInfo;
+	}
 
 	/** @var array */
 	protected $mimeType;
@@ -40,12 +43,6 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
 	/** @var IMimeTypeDetector */
 	protected $mimeTypeDetector;
 
-	/** @var IStorage */
-	protected $storage;
-
-	/** @var string */
-	protected $path;
-
 	/**
 	 * @param IL10N $l
 	 * @param IRequest $request
@@ -62,8 +59,7 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck {
 	 * @param string $path
 	 */
 	public function setFileInfo(IStorage $storage, $path) {
-		$this->storage = $storage;
-		$this->path = $path;
+		$this->_setFileInfo($storage, $path);
 		if (!isset($this->mimeType[$this->storage->getId()][$this->path])
 			|| $this->mimeType[$this->storage->getId()][$this->path] === '') {
 			$this->mimeType[$this->storage->getId()][$this->path] = null;
diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php
index 76c48b7955e2d028e5e1342c038aefb7bb00eee1..62ee601980bfd61c9232d08874cab1eceea8396e 100644
--- a/apps/workflowengine/lib/Check/FileName.php
+++ b/apps/workflowengine/lib/Check/FileName.php
@@ -23,22 +23,16 @@ declare(strict_types=1);
 namespace OCA\WorkflowEngine\Check;
 
 use OCA\WorkflowEngine\Entity\File;
-use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\IRequest;
 use OCP\WorkflowEngine\IFileCheck;
 
 class FileName extends AbstractStringCheck implements IFileCheck {
+	use TFileCheck;
 
 	/** @var IRequest */
 	protected $request;
 
-	/** @var IStorage */
-	protected $storage;
-
-	/** @var string */
-	protected $path;
-
 	/**
 	 * @param IL10N $l
 	 * @param IRequest $request
@@ -48,15 +42,6 @@ class FileName extends AbstractStringCheck implements IFileCheck {
 		$this->request = $request;
 	}
 
-	/**
-	 * @param IStorage $storage
-	 * @param string $path
-	 */
-	public function setFileInfo(IStorage $storage, $path) {
-		$this->storage = $storage;
-		$this->path = $path;
-	}
-
 	/**
 	 * @return string
 	 */
diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php
index ac1896c60578bb982690a4592ab1cc31bcb59912..2ad4bb09e01e710ba5a9759e0ae5ce8b823b22d6 100644
--- a/apps/workflowengine/lib/Check/FileSize.php
+++ b/apps/workflowengine/lib/Check/FileSize.php
@@ -28,6 +28,7 @@ use OCP\IL10N;
 use OCP\IRequest;
 use OCP\Util;
 use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
 
 class FileSize implements ICheck {
 
@@ -118,4 +119,8 @@ class FileSize implements ICheck {
 	public function isAvailableForScope(int $scope): bool {
 		return true;
 	}
+
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		// NOOP
+	}
 }
diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php
index 41b657d53b0442f202f3cbada64c433b30ee097c..e7e114881ade1a06de507ef58b11098b08a7cee2 100644
--- a/apps/workflowengine/lib/Check/FileSystemTags.php
+++ b/apps/workflowengine/lib/Check/FileSystemTags.php
@@ -25,7 +25,6 @@ namespace OCA\WorkflowEngine\Check;
 use OCA\WorkflowEngine\Entity\File;
 use OCP\Files\Cache\ICache;
 use OCP\Files\IHomeStorage;
-use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\SystemTag\ISystemTagManager;
 use OCP\SystemTag\ISystemTagObjectMapper;
@@ -34,6 +33,7 @@ use OCP\WorkflowEngine\ICheck;
 use OCP\WorkflowEngine\IFileCheck;
 
 class FileSystemTags implements ICheck, IFileCheck {
+	use TFileCheck;
 
 	/** @var array */
 	protected $fileIds;
@@ -50,12 +50,6 @@ class FileSystemTags implements ICheck, IFileCheck {
 	/** @var ISystemTagObjectMapper */
 	protected $systemTagObjectMapper;
 
-	/** @var IStorage */
-	protected $storage;
-
-	/** @var string */
-	protected $path;
-
 	/**
 	 * @param IL10N $l
 	 * @param ISystemTagManager $systemTagManager
@@ -67,15 +61,6 @@ class FileSystemTags implements ICheck, IFileCheck {
 		$this->systemTagObjectMapper = $systemTagObjectMapper;
 	}
 
-	/**
-	 * @param IStorage $storage
-	 * @param string $path
-	 */
-	public function setFileInfo(IStorage $storage, $path) {
-		$this->storage = $storage;
-		$this->path = $path;
-	}
-
 	/**
 	 * @param string $operator
 	 * @param string $value
diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
index 28e3bd4be09558f6c67a8adbaff88196905a1d24..0079db4b83178d4d7f9eb23feb255a6fe3b36a47 100644
--- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php
+++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php
@@ -22,10 +22,10 @@
 namespace OCA\WorkflowEngine\Check;
 
 
-use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\IRequest;
 use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
 
 class RequestRemoteAddress implements ICheck {
 
@@ -171,4 +171,8 @@ class RequestRemoteAddress implements ICheck {
 	public function isAvailableForScope(int $scope): bool {
 		return true;
 	}
+
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		// NOOP
+	}
 }
diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php
index 523d251789a964bc52c0a09eee614c0d3f50de75..bf37bf3d2ba231f2ed8c0eb2579d22ad00391a99 100644
--- a/apps/workflowengine/lib/Check/RequestTime.php
+++ b/apps/workflowengine/lib/Check/RequestTime.php
@@ -23,9 +23,9 @@ namespace OCA\WorkflowEngine\Check;
 
 
 use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
 
 class RequestTime implements ICheck {
 
@@ -135,4 +135,7 @@ class RequestTime implements ICheck {
 		return [];
 	}
 
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		// NOOP
+	}
 }
diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php
index 1abb56bbe2d5d4d6fca9d0d428fbae70c02a4427..ddc222833dd0352f64a62e5b225ae41ec7901bc3 100644
--- a/apps/workflowengine/lib/Check/RequestUserAgent.php
+++ b/apps/workflowengine/lib/Check/RequestUserAgent.php
@@ -24,7 +24,6 @@ namespace OCA\WorkflowEngine\Check;
 
 use OCP\IL10N;
 use OCP\IRequest;
-use OCP\WorkflowEngine\IManager;
 
 class RequestUserAgent extends AbstractStringCheck {
 
diff --git a/apps/workflowengine/lib/Check/UserGroupMembership.php b/apps/workflowengine/lib/Check/UserGroupMembership.php
index e9518733f9b46a9c1885c902711b7521665c593a..55f1d017ed02dbe0080cea3c04ed98730896cb85 100644
--- a/apps/workflowengine/lib/Check/UserGroupMembership.php
+++ b/apps/workflowengine/lib/Check/UserGroupMembership.php
@@ -22,12 +22,12 @@
 namespace OCA\WorkflowEngine\Check;
 
 
-use OCP\Files\Storage\IStorage;
 use OCP\IGroupManager;
 use OCP\IL10N;
 use OCP\IUser;
 use OCP\IUserSession;
 use OCP\WorkflowEngine\ICheck;
+use OCP\WorkflowEngine\IEntity;
 use OCP\WorkflowEngine\IManager;
 
 class UserGroupMembership implements ICheck {
@@ -114,4 +114,8 @@ class UserGroupMembership implements ICheck {
 		// admin only by default
 		return $scope === IManager::SCOPE_ADMIN;
 	}
+
+	public function setEntitySubject(IEntity $entity, $subject): void {
+		// NOOP
+	}
 }
diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php
index f5586e83d515a018ef5ad2b693ac99f910c49248..6e9c2fc765ef70e9000560cdd486c4f4f7620983 100644
--- a/lib/public/WorkflowEngine/ICheck.php
+++ b/lib/public/WorkflowEngine/ICheck.php
@@ -70,4 +70,24 @@ interface ICheck {
 	 * @since 18.0.0
 	 */
 	public function isAvailableForScope(int $scope): bool;
+
+	/**
+	 * Equips the check with a subject fitting the Entity. For instance, an
+	 * entity of File will receive an instance of OCP\Files\Node, or a comment
+	 * entity might get an IComment.
+	 *
+	 * The implementing check must be aware of the incoming type.
+	 *
+	 * If an unsupported subject is passed the implementation MAY throw an
+	 * \UnexpectedValueException.
+	 *
+	 * When an implementation does not depend on a subject being passed to it,
+	 * for example RequestTime, the implemented method SHOULD just pass, without
+	 * any further operation.
+	 *
+	 * @param IEntity $entity
+	 * @param mixed $subject
+	 * @throws \UnexpectedValueException
+	 */
+	public function setEntitySubject(IEntity $entity, $subject): void;
 }