2022-06-01 17:59:24 +02:00
% DO NOT COMPILE THIS FILE DIRECTLY!
% This is included by the other .tex files.
\begin { frame} [t,plain]
\titlepage
\end { frame}
\begin { frame}
\frametitle { Content of the presentation}
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item MISP Workflows fundamentals
\item Getting started
2022-07-29 15:39:12 +02:00
\item Design of the system \& how it can be extended
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.9\linewidth] { pictures/overview.png} }
2022-08-01 17:47:36 +02:00
\end { center}
2022-06-01 17:59:24 +02:00
\end { frame}
\begin { frame}
\frametitle { What problems are we trying to tackle}
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item Initial idea came during GeekWeek7.5\footnote { \href { https://cyber.gc.ca/en/events/geekweek-75} { Workshop organized by the Canadian Cyber Center} } \includegraphics [width=0.3\linewidth] { pictures/geekweek75.jpg}
2022-07-29 15:39:12 +02:00
\item Needs:
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item Prevent default MISP behaviors
2022-08-05 08:35:55 +02:00
\item Hook specific actions to run callbacks
2022-07-29 15:39:12 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\item Use-cases:
\begin { itemize}
2022-06-02 08:24:19 +02:00
\item Prevent publication of events not meeting some criterias
2022-08-01 17:47:36 +02:00
\item Prevent querying thrid-party services (e.g. virustotal) with sensitive information
2022-08-05 08:35:55 +02:00
\item Send notifications in a chat rooms
2022-07-07 15:45:58 +02:00
\item And much much more..
2022-06-01 17:59:24 +02:00
\end { itemize}
\end { itemize}
\end { frame}
2022-08-01 17:47:36 +02:00
\section { Workflow - Fundamentals}
2022-06-01 17:59:24 +02:00
\begin { frame}
2022-07-29 15:39:12 +02:00
\frametitle { Simplistic overview of a Workflow in action}
2022-06-01 17:59:24 +02:00
\begin { enumerate}
2022-08-05 08:35:55 +02:00
\item An \textbf { action} happens in MISP
2022-08-01 17:47:36 +02:00
\item If there is an \textbf { enabled} Workflow for that \textbf { action} , run it
2022-07-29 15:39:12 +02:00
\item If all went fine, MISP \textbf { continue} to perform the action
2022-07-07 15:45:58 +02:00
\begin { itemize}
\item The operation can potentially be cancelled by \texttt { blocking} modules
\end { itemize}
2022-06-01 17:59:24 +02:00
\end { enumerate}
\end { frame}
\begin { frame}
\frametitle { Terminology}
2022-08-01 17:47:36 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item \textbf { workflow} : Sequence of all operations (nodes) to be executed. Basically the whole graph.
2022-08-01 17:47:36 +02:00
\item \textbf { execution path} : A path composed of nodes
2022-07-29 15:39:12 +02:00
\item \textbf { trigger} : Starting point of a workflow. Triggers are called when specific actions happen in MISP
2022-06-02 08:24:19 +02:00
\begin { itemize}
2022-07-07 15:45:58 +02:00
\item A trigger can only have one workflow and vice-versa
2022-06-02 08:24:19 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=1.0\linewidth] { pictures/simple-workflow.png} }
2022-06-01 17:59:24 +02:00
\end { center}
\end { frame}
\begin { frame}
2022-07-29 15:39:12 +02:00
\frametitle { Workflow execution process}
Typical execution process:
2022-06-01 17:59:24 +02:00
\begin { enumerate}
2022-08-01 17:47:36 +02:00
\item An action happens in MISP
\item The workflow associated to the trigger is ran
\item Execution result?
2022-07-07 15:45:58 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item \texttt { \color { green!50!black} success} : Continue the action
2022-08-01 17:47:36 +02:00
\item \texttt { \color { red} failure} | \texttt { \color { blue} blocked} : Cancel the action
2022-07-29 15:39:12 +02:00
\end { itemize}
\end { enumerate}
\vspace { 0.5em}
Example for Event publish:
\begin { enumerate}
\item An Event is about to be published
\item MISP executes the workflow listening to the \texttt { event-publish} trigger
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item { \bf \color { green!50!black} success} : Continue the publishing action
2022-07-29 15:39:12 +02:00
\item { \bf \color { red} failure} | \texttt { \color { blue} blocked} : Stop publishing and log the reason
2022-07-07 15:45:58 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\end { enumerate}
\end { frame}
\begin { frame}
2022-07-29 15:39:12 +02:00
\frametitle { Blocking and non-blocking Workflows}
Currently 2 types of workflows:
2022-06-01 17:59:24 +02:00
\vspace { 0.5em}
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item { \bf Blocking} : Completion of the action can be prevented
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-07-29 15:39:12 +02:00
\item If a \textbf { blocking module} blocks the action
\item If a \textbf { blocking module} raises an exception
2022-06-01 17:59:24 +02:00
\end { itemize}
\vspace { 0.5em}
2022-07-29 15:39:12 +02:00
\item { \bf Non-blocking} : Workflow execution outcome has no impact
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-03 14:44:12 +02:00
\item \textbf { Blocking modules} can still stop the execution
2022-06-01 17:59:24 +02:00
\end { itemize}
\end { itemize}
\end { frame}
\begin { frame}
\frametitle { Execution context}
\begin { itemize}
2022-07-29 15:39:12 +02:00
\item Workflows can be triggered by \textbf { any users}
2022-08-01 17:47:36 +02:00
\item Workflows can be triggered by actions done via the \textbf { UI} or \textbf { API}
\item However, the user for which the workflow executes has:
\begin { itemize}
\item The \texttt { site-admin} permission
\item Is from the \texttt { MISP.host\_ org\_ id}
\end { itemize}
\item Ensures data is processed regardless of ownership and access: \textbf { no ACL}
2022-06-01 17:59:24 +02:00
\end { itemize}
\end { frame}
\begin { frame}
2022-08-01 17:47:36 +02:00
\frametitle { Classes of Workflow modules}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-08-01 17:47:36 +02:00
\includegraphics [width=0.6\linewidth] { pictures/module-type.png}
2022-06-01 17:59:24 +02:00
\end { center}
2022-08-01 17:47:36 +02:00
3 classes of modules
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item \textbf { action} : Allow to executes functions, callbacks or scripts
2022-08-01 17:47:36 +02:00
\begin { itemize}
\item Can stop execution
\item e.g. Webhook, block the execution, perform enrichments, ...
\end { itemize}
2022-07-07 15:45:58 +02:00
\item \textbf { logic} : Allow to redirect the execution flow.
\begin { itemize}
\item IF condition, fork the blocking execution into a non-blocking one, ...
\end { itemize}
2022-08-01 17:47:36 +02:00
\item \textbf { blueprint} : Allow to reuse composition of modules
2022-07-07 15:45:58 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item Can save subworkflows and its module's configuration
2022-06-01 17:59:24 +02:00
\end { itemize}
\end { itemize}
\end { frame}
\begin { frame}
2022-08-01 17:47:36 +02:00
\frametitle { Sources of Workflow modules}
2022-07-29 15:39:12 +02:00
3 sources of action modules
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item Built-in \textbf { default} modules
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item Part of the MISP codebase
\item \texttt { \scriptsize \textbf { app/Model/} WorkflowModules/action/[module\_ name].php}
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\item User-defined \textbf { custom} modules
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item Written in PHP
2022-08-01 17:47:36 +02:00
\item Can extend existing default modules
2022-08-05 08:35:55 +02:00
\item Can use MISP's built-in functionalities (restsearch, enrichment, push to zmq, ...)
\item Faster and easier to implement new complex behaviors
\item \texttt { \scriptsize \textbf { app/Lib/} WorkflowModules/action/[module\_ name].php}
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\end { itemize}
\end { frame}
\begin { frame}
\frametitle { Sources of Workflow modules}
3 sources of action modules
\begin { itemize}
\item Modules from the \textbf { enrichment service}
2022-06-02 08:24:19 +02:00
\begin { itemize}
2022-07-29 15:39:12 +02:00
\item \textbf { Default} and \textbf { custom} modules
2022-08-05 08:35:55 +02:00
\item From the \textit { misp-module} \includegraphics [width=0.25\linewidth] { pictures/misp-module-icon.png}
2022-07-07 15:45:58 +02:00
\item Written in Python
\item Can use any python libraries
2022-08-05 08:35:55 +02:00
\item New \textit { misp-module} module type: \texttt { action}
2022-06-02 08:24:19 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\vspace { 1em}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-07-07 15:45:58 +02:00
$ \rightarrow $ Both the PHP and Python systems are \textbf { plug-and-play}
2022-06-01 17:59:24 +02:00
\end { center}
\end { frame}
2022-08-01 17:47:36 +02:00
\begin { frame}
\frametitle { Triggers currently available}
Currently 8 triggers can be hooked. 3 being \textbf { blocking} .
\includegraphics [width=1.0\linewidth] { pictures/triggers.png}
\end { frame}
\section { Workflow - Getting started}
2022-06-02 08:40:47 +02:00
\begin { frame}
2022-07-07 16:00:18 +02:00
\frametitle { Getting started with workflows (1)}
2022-07-07 15:45:58 +02:00
Review MISP settings:
2022-06-02 08:40:47 +02:00
\begin { enumerate}
2022-07-07 15:45:58 +02:00
\item Make sure \texttt { MISP.background\_ jobs} is turned on
2022-07-29 15:39:12 +02:00
\item Make sure workers are up-and-running and healthy
2022-08-01 17:47:36 +02:00
\item Turn the setting \texttt { Plugin.Workflow\_ enable} on
\begin { center}
\includegraphics [width=0.70\linewidth] { pictures/settings-1.png}
\end { center}
\item { [optional:misp-module]} Turn the setting \texttt { Plugin.Action\_ services\_ enable} on
\begin { center}
\includegraphics [width=0.70\linewidth] { pictures/settings-2.png}
\end { center}
2022-06-02 08:40:47 +02:00
\end { enumerate}
2022-06-01 17:59:24 +02:00
\end { frame}
2022-08-01 17:47:36 +02:00
\begin { frame} [fragile]
2022-07-07 16:00:18 +02:00
\frametitle { Getting started with workflows (2)}
2022-08-01 17:47:36 +02:00
If you wish to use action modules from \texttt { misp-module} , make sure to have:
2022-07-07 16:00:18 +02:00
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item The latest update of \texttt { misp-module}
\begin { itemize}
\item There should be an \texttt { action\_ mod} module type in \url { misp-modules/misp\_ modules/modules}
\end { itemize}
\item Restarted your \texttt { misp-module} application
2022-07-07 16:00:18 +02:00
\end { itemize}
2022-08-05 08:35:55 +02:00
\vspace { 1em}
2022-08-01 17:47:36 +02:00
\begin { lstlisting} [language=text,firstnumber=1]
# This command should show all `action` modules
2022-08-05 08:35:55 +02:00
$ curl - s http: / / 127 . 0 . 0 . 1 : 6666 / modules | \
jq '.[] | select(.meta."module-type"[] | contains("action")) |
2022-08-01 17:47:36 +02:00
{ name: .name, version: .meta.version} '
\end { lstlisting}
2022-07-07 16:00:18 +02:00
\end { frame}
\begin { frame}
\frametitle { Getting started with workflows (3)}
2022-06-01 17:59:24 +02:00
\begin { enumerate}
2022-08-01 17:47:36 +02:00
\item Go to the list of modules
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item \texttt { Administration > Workflows > List Modules}
\item or \url { /workflows/moduleIndex}
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\item Make sure \textbf { default} modules are loaded
\item { [optional:misp-module]} Make sure \textbf { misp-module} modules are loaded
2022-06-01 17:59:24 +02:00
\end { enumerate}
\end { frame}
\begin { frame}
2022-07-07 15:45:58 +02:00
\frametitle { Creating a workflow with the editor}
2022-06-01 17:59:24 +02:00
\begin { enumerate}
2022-08-01 17:47:36 +02:00
\item Go to the list of triggers \texttt { Administration > Workflows}
\item Enable and edit a \texttt { trigger} from the list
2022-07-07 15:45:58 +02:00
\item Drag an \texttt { action} module from the side panel to the canvas
2022-08-01 17:47:36 +02:00
\item From the \texttt { trigger} output, drag an arrow into the \texttt { action} 's input (left side)
\item Execute the action that would run the trigger and observe the effect!
2022-06-01 17:59:24 +02:00
\end { enumerate}
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.7\linewidth] { pictures/triggers.png} }
2022-06-01 17:59:24 +02:00
\end { center}
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.50\linewidth] { pictures/editor-1.png} }
2022-06-01 17:59:24 +02:00
\end { center}
\end { frame}
\begin { frame}
2022-07-07 15:45:58 +02:00
\frametitle { Working with the editor}
Operations not allowed:
\begin { itemize}
\item Execution loop are not authorized
2022-06-01 17:59:24 +02:00
\begin { itemize}
2022-07-07 15:45:58 +02:00
\item Current caveat: If an action re-run the workflow in any way
2022-06-01 17:59:24 +02:00
\end { itemize}
2022-07-07 15:45:58 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.7\linewidth] { pictures/editor-not-allowed-1.png} }
2022-06-01 17:59:24 +02:00
\end { center}
\end { frame}
2022-08-01 17:47:36 +02:00
\begin { frame}
\frametitle { Working with the editor}
Operations not allowed:
\begin { itemize}
\item Multiple connections from the same output
\begin { itemize}
\item Execution order not guaranted and confusing for users
\end { itemize}
\end { itemize}
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.7\linewidth] { pictures/editor-not-allowed-2.png} }
2022-08-01 17:47:36 +02:00
\end { center}
\end { frame}
\begin { frame}
\frametitle { Working with the editor}
Operations showing a warning:
\begin { itemize}
\item \textbf { Blocking} modules after a \textbf { concurrent tasks} module
2022-08-05 08:35:55 +02:00
\item \textbf { Blocking} modules in a \textbf { non-blocking} workflow
2022-08-01 17:47:36 +02:00
\end { itemize}
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=1.0\linewidth] { pictures/editor-warning-1.png} }
2022-08-01 17:47:36 +02:00
\end { center}
\end { frame}
2022-07-29 15:39:12 +02:00
\begin { frame}
\frametitle { Workflow blueprints}
\begin { enumerate}
2022-08-05 08:35:55 +02:00
\item Blueprints allow to \textbf { re-use parts} of a workflow in another one
\item Blueprints can be saved, exported and \textbf { shared}
2022-07-29 15:39:12 +02:00
\end { enumerate}
\begin { center}
\includegraphics [width=0.5\linewidth] { pictures/blueprint-debugging.png}
\end { center}
Blueprints origins:
\begin { enumerate}
\item From the "official" \texttt { misp-workflow-blueprints} repository
\item Created or imported by users
\end { enumerate}
\end { frame}
2022-06-01 17:59:24 +02:00
\begin { frame}
2022-07-07 15:45:58 +02:00
\frametitle { Workflow blueprints: Create}
Select one or more modules to be saved as blueprint then click on the \texttt { save blueprint} button
2022-06-01 17:59:24 +02:00
\begin { center}
2022-07-07 15:45:58 +02:00
\includegraphics [width=0.85\linewidth] { pictures/blueprint-1.png}
2022-06-01 17:59:24 +02:00
\end { center}
\end { frame}
2022-07-29 15:39:12 +02:00
\begin { frame} [fragile]
\frametitle { Hash path filtering}
\begin { itemize}
\item Some modules have the possibility to filter or check conditions using CakePHP's path expression.
\end { itemize}
\begin { lstlisting} [language=javascript,firstnumber=1]
$ path _ expression = ' { n } [ name = fred ] .id';
$ users = [
{ 'id': 123, 'name': 'fred', 'surname': 'bloggs'} ,
{ 'id': 245, 'name': 'fred', 'surname': 'smith'} ,
{ 'id': 356, 'name': 'joe', 'surname': 'smith'} ,
];
$ ids = Hash::extract ( $ users, $ path _ expression ) ;
// => $ ids will be [ 123 , 245 ]
\end { lstlisting}
2022-08-01 17:47:36 +02:00
\begin { center}
\includegraphics [width=0.4\linewidth] { pictures/module-if-generic.png}
\end { center}
\end { frame}
\begin { frame}
\frametitle { Module filtering}
\begin { itemize}
\item Some action modules accept \textbf { filtering} conditions
\item E.g. the \texttt { enrich-event} module will only perform the enrichment on Attributes having a \texttt { tlp:white} Tag
\end { itemize}
\begin { center}
\includegraphics [width=0.7\linewidth] { pictures/module-filtering.png}
\end { center}
2022-07-29 15:39:12 +02:00
\end { frame}
2022-06-01 17:59:24 +02:00
\begin { frame}
2022-07-29 15:39:12 +02:00
\frametitle { Data format in Workflows}
2022-08-01 17:47:36 +02:00
\begin { center}
\includegraphics [width=0.7\linewidth] { pictures/workflow-trigger.png}
\end { center}
2022-07-29 15:39:12 +02:00
\begin { itemize}
\item All triggers will inject data in a workflow
\item In some cases, there is no format (e.g. User after-save)
\item In others, the format is \textbf { compliant with the MISP Core format}
\item In addition to the RFC, the passed data has \textbf { additional properties}
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item Attributes are \textbf { always encapsulated} in the Event or Object
\item Additional key \textbf { \texttt { \_ AttributeFlattened} }
\item Additional key \textbf { \texttt { \_ allTags} }
\item Additional key \textbf { \texttt { inherited} } for Tags
2022-07-29 15:39:12 +02:00
\end { itemize}
\end { itemize}
\end { frame}
\begin { frame}
\frametitle { Logic module: Concurrent Task}
\begin { itemize}
2022-08-01 17:47:36 +02:00
\item Special type of \textbf { logic} module allowing multiple connections
2022-08-05 08:35:55 +02:00
\item Allows \textbf { breaking the execution} flow into a concurrent tasks to be executed later on by a background worker
\item As a side effect, blocking modules \textbf { cannot cancel} ongoing operations
2022-07-29 15:39:12 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=0.45\linewidth] { pictures/module-concurrent.png} }
2022-08-01 17:47:36 +02:00
\end { center}
2022-07-29 15:39:12 +02:00
\end { frame}
\begin { frame}
2022-08-03 14:44:12 +02:00
\frametitle { Debugging Workflows: Log Entries}
2022-07-29 15:39:12 +02:00
\begin { itemize}
2022-08-02 09:36:42 +02:00
\item Workflow execution is logged in the application logs:
\begin { itemize}
\item \texttt { /admin/logs/index}
\end { itemize}
\item Or stored on disk in the following file:
\begin { itemize}
\item \texttt { /app/tmp/logs/workflow-execution.log}
\end { itemize}
2022-08-03 14:44:12 +02:00
\item Use the \texttt { webhook-listener.py} tool
\begin { itemize}
\item \texttt { /app/tools/misp-workflows/webhook-listener.py}
\end { itemize}
2022-07-29 15:39:12 +02:00
\end { itemize}
2022-08-01 17:47:36 +02:00
\begin { center}
\includegraphics [width=1.0\linewidth] { pictures/workflow-debug.png}
\end { center}
2022-06-01 17:59:24 +02:00
\end { frame}
2022-07-07 15:45:58 +02:00
2022-08-03 14:44:12 +02:00
\begin { frame}
\frametitle { Debugging Workflows: Debug mode}
\begin { itemize}
\item The \includegraphics [width=70px] { pictures/debug-mode.png} can be turned on for each workflows
\item Each nodes will send data to the provided URL
\begin { itemize}
\item Configure the setting: \texttt { Plugin.Workflow\_ debug\_ url}
\end { itemize}
2022-08-05 08:35:55 +02:00
\item Result can be visualized in
2022-08-03 14:44:12 +02:00
\begin { itemize}
\item \textbf { offline} : \texttt { tools/misp-workflows/webhook-listener.py}
2022-08-05 08:35:55 +02:00
\item \textbf { online} : \url { requestbin.com} or similar websites
2022-08-03 14:44:12 +02:00
\end { itemize}
\end { itemize}
\begin { center}
\includegraphics [width=0.6\linewidth] { pictures/request-bin.png}
\end { center}
\end { frame}
2022-07-07 15:45:58 +02:00
\section { Learning by examples}
2022-06-01 17:59:24 +02:00
\begin { frame}
2022-07-07 15:45:58 +02:00
\frametitle { Workflow example 1}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-08-05 08:35:55 +02:00
\frame { \includegraphics [width=1.0\linewidth] { pictures/example-1a.png} }
2022-06-01 17:59:24 +02:00
\end { center}
2022-07-07 15:45:58 +02:00
2022-08-02 09:36:42 +02:00
\begin { enumerate}
\item The \texttt { Event-Publish} trigger uses the MISP core format
\item The \texttt { IF::Tag} module checks if at least one of the Attribute has the \texttt { tlp:white} tag
\item If it does, the \texttt { Push-to-ZMQ} module will be executed
\end { enumerate}
2022-06-01 17:59:24 +02:00
\end { frame}
\begin { frame}
2022-07-07 15:45:58 +02:00
\frametitle { Workflow example 2}
2022-06-01 17:59:24 +02:00
\begin { center}
2022-08-02 09:36:42 +02:00
\includegraphics [width=1.0\linewidth] { pictures/example-2a.png}
2022-06-01 17:59:24 +02:00
\end { center}
2022-07-07 15:45:58 +02:00
\begin { itemize}
2022-08-02 09:36:42 +02:00
\item If an event has the \texttt { tlp:red} tag or any of the attribute has it, the publish process will be cancelled
2022-07-07 15:45:58 +02:00
\end { itemize}
2022-06-01 17:59:24 +02:00
\end { frame}
2022-07-07 15:45:58 +02:00
2022-08-02 09:36:42 +02:00
\section { Extending the system}
2022-07-07 15:54:39 +02:00
\begin { frame}
\frametitle { Creating a new module in PHP}
\begin { center}
\includegraphics [width=0.65\linewidth] { pictures/custom-1.png}
\end { center}
\begin { itemize}
2022-08-05 08:35:55 +02:00
\item \texttt { \small \textbf { app/Lib/} WorkflowModules/action/[module\_ name].php}
2022-07-07 15:54:39 +02:00
\item Module configuration are defined as public variables
\item The \texttt { exec} function has to be implemented.
\begin { itemize}
2022-08-02 09:36:42 +02:00
\item If it returns \textbf { true} , execution will proceed
\item If it returns \textbf { false}
2022-07-07 15:54:39 +02:00
\begin { itemize}
2022-08-02 09:36:42 +02:00
\item And the module is blocking, the execution will stop and the operation will be blocked
2022-07-07 15:54:39 +02:00
\end { itemize}
\end { itemize}
\end { itemize}
\end { frame}
\begin { frame}
\frametitle { Creating a new module in Python}
\begin { center}
2022-08-02 09:36:42 +02:00
\includegraphics [width=0.65\linewidth] { pictures/custom-2.png}
2022-07-07 15:54:39 +02:00
\end { center}
\begin { itemize}
\item Module configuration are defined in the \texttt { moduleinfo} and \texttt { moduleconfig} variables
\item The \texttt { handler} function has to be implemented.
\item Blocking logic is the same as other modules
\end { itemize}
\end { frame}