All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.uni.freiburg.iig.telematik.sepia.petrinet.PNProcessUtils Maven / Gradle / Ivy

Go to download

SEPIA provides implementations for various types of Petri nets. Along Place/Transition-nets, it supports Petri nets with distinguishable token colors and defines coloured workflow nets, where coloured tokens are interpreted as data elements used during process execution. To support information flow analysis of processes, SEPIA defines so-called IF-Nets, tailored for security-oriented workflow modeling which enable users to assign security-levels (HIGH, LOW) to transitions, data elements and persons/agents participating in the process execution.

The newest version!
package de.uni.freiburg.iig.telematik.sepia.petrinet;

import java.util.Collection;
import java.util.List;

import de.invation.code.toval.validate.ParameterException;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractTransition;
import de.uni.freiburg.iig.telematik.sepia.util.PNUtils;
import de.uni.freiburg.iig.telematik.sewol.context.constraint.ConstraintContext;
import de.uni.freiburg.iig.telematik.sewol.context.process.ProcessContext;

public class PNProcessUtils {

	/**
	 * Creates a new context on basis of the given Petri net transitions.
* Transitions are converted into a list of activity names. * @param name * @param transitions Petri net transitions to be used as basis for activity names. * @return * @throws ParameterException If activity list is null or empty. */ public static ConstraintContext createProcessContext(String name, Collection> transitions){ ConstraintContext context = new ConstraintContext(name); context.setActivities(PNUtils.getLabelSetFromTransitions(transitions, false)); return context; } /** * Creates a new context using an RBAC access control model.
* Users and permissions to execute transactions are randomly assigned to the given roles.
* Each person is assigned to exactly one role. * @param transitions A collection of Petri net transitions. * @param originatorCount The number of desired originators. * @param roles The roles to use. * @return A new randomly generated Context. * @throws ParameterException */ public static ConstraintContext createRandomContext(Collection> transitions, int originatorCount, List roles){ ProcessContext duContext = ProcessContext.createRandomContext(PNUtils.getLabelSetFromTransitions(transitions, false), originatorCount, roles); try { return ConstraintContext.newInstance(duContext); } catch (Exception e) { throw new RuntimeException(e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy