class GetAllDMNContextCommand implements ExecutableCommand<Map<String, Object>> {

    @Override
    public Map<String, Object> execute(Context context) {
        RegistryContext registryContext = (RegistryContext) context;
        DMNResult dmnResult = registryContext.lookup(DMNResult.class);
        if(dmnResult == null) {
            throw new IllegalStateException("There is not DMNResult available");
        }

        return dmnResult.getContext().getAll();
    }

}